From 23c8b375ccdaff42d785bce058fd2b3efc7328d8 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Wed, 11 Mar 2009 16:06:14 -0500 Subject: [PATCH] Uncommenting most remaining regexp unit tests --- basis/regexp/regexp-tests.factor | 37 ++++++++++++-------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/basis/regexp/regexp-tests.factor b/basis/regexp/regexp-tests.factor index 0b94f8296d..eedbcbbc4f 100644 --- a/basis/regexp/regexp-tests.factor +++ b/basis/regexp/regexp-tests.factor @@ -452,30 +452,21 @@ IN: regexp-tests [ t ] [ "fooxbar" "foo\\Bxbar" matches? ] unit-test [ f ] [ "foo" "foo\\Bbar" matches? ] unit-test -! [ 1 ] [ "aaacb" "a+?" match-index-head ] unit-test -! [ 1 ] [ "aaacb" "aa??" match-index-head ] unit-test -! [ f ] [ "aaaab" "a++ab" matches? ] unit-test -! [ t ] [ "aaacb" "a++cb" matches? ] unit-test -! [ 3 ] [ "aacb" "aa?c" match-index-head ] unit-test -! [ 3 ] [ "aacb" "aa??c" match-index-head ] unit-test +[ t ] [ "ab" "a(?=b*)" re-contains? ] unit-test +[ t ] [ "abbbbbc" "a(?=b*c)" re-contains? ] unit-test +[ f ] [ "abbbbb" "a(?=b*c)" re-contains? ] unit-test +[ t ] [ "ab" "a(?=b*)" re-contains? ] unit-test -! "ab" "a(?=b*)" match -! "abbbbbc" "a(?=b*c)" match -! "ab" "a(?=b*)" match +[ "az" ] [ "baz" "(?<=b)(az)" first-match >string ] unit-test +[ f ] [ "chaz" "(?<=b)(az)" re-contains? ] unit-test +[ "a" ] [ "cbaz" "(?<=b*)a" first-match >string ] unit-test +[ f ] [ "baz" "a(?<=b)" re-contains? ] unit-test -! "baz" "(az)(?<=b)" first-match -! "cbaz" "a(?<=b*)" first-match -! "baz" "a(?<=b)" first-match +[ f ] [ "baz" "(? re-contains? ] unit-test +[ t ] [ "caz" "(? re-contains? ] unit-test -! "baz" "a(? first-match -! "caz" "a(? first-match +[ "abcd" ] [ "abcdefg" "a(?=bcdefg)bcd" first-match >string ] unit-test +[ t ] [ "abcdefg" "a(?#bcdefg)bcd" re-contains? ] unit-test +[ t ] [ "abcdefg" "a(?:bcdefg)" matches? ] unit-test -! "abcdefg" "a(?=bcdefg)bcd" first-match -! "abcdefg" "a(?#bcdefg)bcd" first-match -! "abcdefg" "a(?:bcdefg)" first-match - -! "caba" "a(?<=b)" first-match - -! capture group 1: "aaaa" 2: "" -! "aaaa" "(a*)(a*)" match* -! "aaaa" "(a*)(a+)" match* +[ 3 ] [ "caba" "(?<=b)a" first-match from>> ] unit-test