fixed another typo in the code, added tests

svn: r4936
This commit is contained in:
Eli Barzilay 2006-11-23 17:49:24 +00:00
parent f902ea5ba9
commit a0243b4616
2 changed files with 4 additions and 1 deletions

View File

@ -447,7 +447,7 @@
(if simple? simple-item:s item:s)
#\* ".*" "."))]
[(pfx sfx) (if case-sens?
(if b? (values #"^" #"^")
(if b? (values #"^" #"$")
(values "^" "$"))
(if b? (values #"^(?i:" #")$")
(values "^(?i:" ")$")))]

View File

@ -125,6 +125,9 @@
(car xs)
(begin (test res regexp-match? re (car xs))
res))))))))])
((g->re-test #"foo*bar" #t #t)
#t #"foobar" #"foo-bar" #"foo--bar"
#f #"fobar" #"foo-barr" #"ffoo-bar" #".foobar")
((g->re-test "foo*bar" #t #t)
#t "foobar" "foo-bar" "foo--bar"
#f "fobar" "foo-barr" "ffoo-bar" ".foobar")