From eea3b32e72174023716ecbbd3c4d627091dfdb2f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 18 Oct 2012 01:19:59 +0200 Subject: [PATCH] t: Add another test. Shows one problem of words-nonword. --- t/expected-empty.txt | 7 ++++++- t/expected-nonspaces.txt | 7 ++++++- t/expected-word-nonword.txt | 7 ++++++- t/expected-words-nonword.txt | 7 ++++++- t/expected-words-nonwords-spaces.txt | 7 ++++++- t/expected-words-nonwords.txt | 7 ++++++- t/expected-words-nonwordspaces-spaces.txt | 7 ++++++- t/expected-words-nonwordspaces.txt | 7 ++++++- t/test.sh | 8 ++++++++ 9 files changed, 56 insertions(+), 8 deletions(-) diff --git a/t/expected-empty.txt b/t/expected-empty.txt index 3440328..19c91bf 100644 --- a/t/expected-empty.txt +++ b/t/expected-empty.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests ==== @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow = $0 $! $? $. +allow = $! $? +allow = $0 $! $? diff --git a/t/expected-nonspaces.txt b/t/expected-nonspaces.txt index 4a86a16..d6b3558 100644 --- a/t/expected-nonspaces.txt +++ b/t/expected-nonspaces.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests [-=====-]{+====+} @@ -25,3 +25,8 @@ function testme() { } } return 42; +} + +allow = {+$0+} $! $? $. +allow = $! $?[-$.-] +allow = {+$0+} $! $?[-$.-] diff --git a/t/expected-word-nonword.txt b/t/expected-word-nonword.txt index 5c60650..76b34ac 100644 --- a/t/expected-word-nonword.txt +++ b/t/expected-word-nonword.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests ====[-=-] @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow = ${+0 $+}! $? $. +allow = $! $?[- $.-] +allow = $[-!-]{+0+} $[-?-]{+!+} $[-.-]{+?+} diff --git a/t/expected-words-nonword.txt b/t/expected-words-nonword.txt index 7bae7ed..5e0f6b1 100644 --- a/t/expected-words-nonword.txt +++ b/t/expected-words-nonword.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests ====[-=-] @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow = ${+0 $+}! $? $. +allow = $! $?[- $.-] +allow = $[-!-]{+0+} $[-?-]{+!+} $[-.-]{+?+} diff --git a/t/expected-words-nonwords-spaces.txt b/t/expected-words-nonwords-spaces.txt index 4ac431c..cbc70dc 100644 --- a/t/expected-words-nonwords-spaces.txt +++ b/t/expected-words-nonwords-spaces.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests [-=====-]{+====+} @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow[- = $! $? $.-]{+ = $0 $! $? $.+} +allow[- = $! $? $.-]{+ = $! $?+} +allow[- = $! $? $.-]{+ = $0 $! $?+} diff --git a/t/expected-words-nonwords.txt b/t/expected-words-nonwords.txt index 4ac431c..cbc70dc 100644 --- a/t/expected-words-nonwords.txt +++ b/t/expected-words-nonwords.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests [-=====-]{+====+} @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow[- = $! $? $.-]{+ = $0 $! $? $.+} +allow[- = $! $? $.-]{+ = $! $?+} +allow[- = $! $? $.-]{+ = $0 $! $?+} diff --git a/t/expected-words-nonwordspaces-spaces.txt b/t/expected-words-nonwordspaces-spaces.txt index 0606ad5..11769da 100644 --- a/t/expected-words-nonwordspaces-spaces.txt +++ b/t/expected-words-nonwordspaces-spaces.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests [-=====-]{+====+} @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow = {+$0 +}$! $? $. +allow = $! $?[- $.-] +allow = {+$0 +}$! $?[- $.-] diff --git a/t/expected-words-nonwordspaces.txt b/t/expected-words-nonwordspaces.txt index 6d80450..ce5d927 100644 --- a/t/expected-words-nonwordspaces.txt +++ b/t/expected-words-nonwordspaces.txt @@ -1,7 +1,7 @@ diff --git a/test.txt b/test.txt --- a/test.txt +++ b/test.txt -@@ -1,21 +1,22 @@ +@@ -1,26 +1,27 @@ Tests [-=====-]{+====+} @@ -24,3 +24,8 @@ function testme() { } } return 42; +} + +allow = {+$0+} $! $? $. +allow = $! $?[-$.-] +allow = {+$0+} $! $?[-$.-] diff --git a/t/test.sh b/t/test.sh index aedbff0..81e3b12 100755 --- a/t/test.sh +++ b/t/test.sh @@ -55,6 +55,10 @@ function testme() { } return 42; } + +allow = \$! \$? \$. +allow = \$! \$? \$. +allow = \$! \$? \$. EOF git add test.txt git commit -m 'Initial commit.' > /dev/null @@ -83,6 +87,10 @@ function testme() { } return 42; } + +allow = \$0 \$! \$? \$. +allow = \$! \$? +allow = \$0 \$! \$? EOF -- 2.44.1