| 
									
										
										
										
											2008-09-18 15:42:16 -04:00
										 |  |  | USING: kernel tools.test regexp.backend regexp ;
 | 
					
						
							|  |  |  | IN: regexp.parser | 
					
						
							| 
									
										
										
										
											2008-08-26 21:24:14 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : test-regexp ( string -- )
 | 
					
						
							|  |  |  |     default-regexp parse-regexp ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-09-18 15:42:16 -04:00
										 |  |  | ! [ "(" ] [ unmatched-parentheses? ] must-fail-with | 
					
						
							| 
									
										
										
										
											2008-08-26 21:24:14 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ "a|b" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "a.b" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "a|b|c" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "abc|b" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "a|bcd" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "a|(b)" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "(a)|b" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "(a|b)" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "((a)|(b))" test-regexp ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ "(?:a)" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "(?i:a)" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "(?-i:a)" test-regexp ] unit-test | 
					
						
							| 
									
										
										
										
											2008-11-24 23:17:47 -05:00
										 |  |  | [ "(?z:a)" test-regexp ] [ unknown-regexp-option? ] must-fail-with | 
					
						
							|  |  |  | [ "(?-z:a)" test-regexp ] [ unknown-regexp-option? ] must-fail-with | 
					
						
							| 
									
										
										
										
											2008-08-26 21:24:14 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ "(?=a)" test-regexp ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ ] [ "[abc]" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "[a-c]" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "[^a-c]" test-regexp ] unit-test | 
					
						
							|  |  |  | [ "[^]" test-regexp ] must-fail | 
					
						
							| 
									
										
										
										
											2008-09-13 19:20:38 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | [ ] [ "|b" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "b|" test-regexp ] unit-test | 
					
						
							|  |  |  | [ ] [ "||" test-regexp ] unit-test |