diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-31 08:40:11 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-01-31 08:40:11 +0200 |
commit | 78c79c06d07735d5881ea08cf40e014a41d341af (patch) | |
tree | fba8fec3046fad456b6199132d4d8c907932da97 /testdir | |
parent | e2d71a98a4c901a4584d4565ae54a2a594def747 (diff) | |
download | one-true-awk-78c79c06d07735d5881ea08cf40e014a41d341af.tar.gz |
Fix a{0}, update tests.
Diffstat (limited to 'testdir')
-rwxr-xr-x | testdir/T.int-expr | 42 | ||||
-rwxr-xr-x | testdir/T.misc | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/testdir/T.int-expr b/testdir/T.int-expr index e71a075..de77532 100755 --- a/testdir/T.int-expr +++ b/testdir/T.int-expr @@ -18,6 +18,34 @@ pat ab{0}c ac 1 abc 0 +pat a(b{0})c +ac 1 +abc 0 + +pat ab{0}*c +ac 1 +abc 0 + +pat a(b{0})*c +ac 1 +abc 0 + +pat ab{0,}c +ac 1 +abc 1 + +pat a(b{0,})c +ac 1 +abc 1 + +pat ab{0,}*c +ac 1 +abc 1 + +pat a(b{0,})*c +ac 1 +abc 1 + pat ab{1}c ac 0 abc 1 @@ -53,6 +81,20 @@ EOF cat << \EOF > foo1 ac ~ /ab{0}c/ -> should be 1, is 1 abc ~ /ab{0}c/ -> should be 0, is 0 +ac ~ /a(b{0})c/ -> should be 1, is 1 +abc ~ /a(b{0})c/ -> should be 0, is 0 +ac ~ /ab{0}*c/ -> should be 1, is 1 +abc ~ /ab{0}*c/ -> should be 0, is 0 +ac ~ /a(b{0})*c/ -> should be 1, is 1 +abc ~ /a(b{0})*c/ -> should be 0, is 0 +ac ~ /ab{0,}c/ -> should be 1, is 1 +abc ~ /ab{0,}c/ -> should be 1, is 1 +ac ~ /a(b{0,})c/ -> should be 1, is 1 +abc ~ /a(b{0,})c/ -> should be 1, is 1 +ac ~ /ab{0,}*c/ -> should be 1, is 1 +abc ~ /ab{0,}*c/ -> should be 1, is 1 +ac ~ /a(b{0,})*c/ -> should be 1, is 1 +abc ~ /a(b{0,})*c/ -> should be 1, is 1 ac ~ /ab{1}c/ -> should be 0, is 0 abc ~ /ab{1}c/ -> should be 1, is 1 abbc ~ /ab{1}c/ -> should be 0, is 0 diff --git a/testdir/T.misc b/testdir/T.misc index a191ae2..3903606 100755 --- a/testdir/T.misc +++ b/testdir/T.misc @@ -382,7 +382,7 @@ $awk 'BEGIN \ print "hello, world" } }}}' >foo1 2>foo2 -grep 'source line 5' foo2 >/dev/null 2>&1 || echo 'BAD: T.misc continuation line number' +grep 'source line 4' foo2 >/dev/null 2>&1 || echo 'BAD: T.misc continuation line number' echo 111 222 333 >foo |