summaryrefslogtreecommitdiff
path: root/tests/tac
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-05-16 20:35:23 +0000
committerJim Meyering <jim@meyering.net>1998-05-16 20:35:23 +0000
commit9abd463ffb1aa9f3f7748cff2dc66e1b3b7bf071 (patch)
tree234df68756fc2fa19c8d40215399bd5c717eb2d3 /tests/tac
parentb54c86e8bc5b8541b079fdbb0ae678f11b30100b (diff)
downloadcoreutils-9abd463ffb1aa9f3f7748cff2dc66e1b3b7bf071.tar.xz
.
Diffstat (limited to 'tests/tac')
-rw-r--r--tests/tac/Makefile.am6
-rw-r--r--tests/tac/Makefile.in6
-rwxr-xr-xtests/tac/tac-tests104
3 files changed, 111 insertions, 5 deletions
diff --git a/tests/tac/Makefile.am b/tests/tac/Makefile.am
index 950aeafd5..37d9d8787 100644
--- a/tests/tac/Makefile.am
+++ b/tests/tac/Makefile.am
@@ -8,13 +8,15 @@ basic-c.I basic-c.X basic-d.I basic-d.X basic-e.I basic-e.X basic-f.I \
basic-f.X basic-g.I basic-g.X basic-h.I basic-h.X basic-i.I basic-i.X \
basic-j.I basic-j.X basic-k.I basic-k.X b2-e.I b2-e.X b2-f.I b2-f.X b2-g.I \
b2-g.X b2-h.I b2-h.X b2-i.I b2-i.X b2-j.I b2-j.X b2-k.I b2-k.X opt-b.I \
-opt-b.X opt-s.I opt-s.X opt-sb.I opt-sb.X opt-r.I opt-r.X opt-br.I opt-br.X
+opt-b.X opt-s.I opt-s.X opt-sb.I opt-sb.X opt-r.I opt-r.X opt-r2.I opt-r2.X \
+opt-br.I opt-br.X opt-br2.I opt-br2.X
run_gen = basic-0.O basic-0.E basic-a.O basic-a.E basic-b.O basic-b.E \
basic-c.O basic-c.E basic-d.O basic-d.E basic-e.O basic-e.E basic-f.O \
basic-f.E basic-g.O basic-g.E basic-h.O basic-h.E basic-i.O basic-i.E \
basic-j.O basic-j.E basic-k.O basic-k.E b2-e.O b2-e.E b2-f.O b2-f.E b2-g.O \
b2-g.E b2-h.O b2-h.E b2-i.O b2-i.E b2-j.O b2-j.E b2-k.O b2-k.E opt-b.O \
-opt-b.E opt-s.O opt-s.E opt-sb.O opt-sb.E opt-r.O opt-r.E opt-br.O opt-br.E
+opt-b.E opt-s.O opt-s.E opt-sb.O opt-sb.E opt-r.O opt-r.E opt-r2.O opt-r2.E \
+opt-br.O opt-br.E opt-br2.O opt-br2.E
##test-files-end
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/tac/Makefile.in b/tests/tac/Makefile.in
index 6f93ca131..0f03e79c8 100644
--- a/tests/tac/Makefile.in
+++ b/tests/tac/Makefile.in
@@ -94,13 +94,15 @@ basic-c.I basic-c.X basic-d.I basic-d.X basic-e.I basic-e.X basic-f.I \
basic-f.X basic-g.I basic-g.X basic-h.I basic-h.X basic-i.I basic-i.X \
basic-j.I basic-j.X basic-k.I basic-k.X b2-e.I b2-e.X b2-f.I b2-f.X b2-g.I \
b2-g.X b2-h.I b2-h.X b2-i.I b2-i.X b2-j.I b2-j.X b2-k.I b2-k.X opt-b.I \
-opt-b.X opt-s.I opt-s.X opt-sb.I opt-sb.X opt-r.I opt-r.X opt-br.I opt-br.X
+opt-b.X opt-s.I opt-s.X opt-sb.I opt-sb.X opt-r.I opt-r.X opt-r2.I opt-r2.X \
+opt-br.I opt-br.X opt-br2.I opt-br2.X
run_gen = basic-0.O basic-0.E basic-a.O basic-a.E basic-b.O basic-b.E \
basic-c.O basic-c.E basic-d.O basic-d.E basic-e.O basic-e.E basic-f.O \
basic-f.E basic-g.O basic-g.E basic-h.O basic-h.E basic-i.O basic-i.E \
basic-j.O basic-j.E basic-k.O basic-k.E b2-e.O b2-e.E b2-f.O b2-f.E b2-g.O \
b2-g.E b2-h.O b2-h.E b2-i.O b2-i.E b2-j.O b2-j.E b2-k.O b2-k.E opt-b.O \
-opt-b.E opt-s.O opt-s.E opt-sb.O opt-sb.E opt-r.O opt-r.E opt-br.O opt-br.E
+opt-b.E opt-s.O opt-s.E opt-sb.O opt-sb.E opt-r.O opt-r.E opt-r2.O opt-r2.E \
+opt-br.O opt-br.E opt-br2.O opt-br2.E
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
noinst_SCRIPTS = $x-tests
diff --git a/tests/tac/tac-tests b/tests/tac/tac-tests
index f96d5d5db..432bf7b80 100755
--- a/tests/tac/tac-tests
+++ b/tests/tac/tac-tests
@@ -732,6 +732,57 @@ else
esac
fi
test -s opt-r.E || rm -f opt-r.E
+$xx -r -s '\._+' $srcdir/opt-r2.I > opt-r2.O 2> opt-r2.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test opt-r2(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp opt-r2.O $srcdir/opt-r2.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed opt-r2(F)"; fi ;;
+ 1) $echo "Test opt-r2(F) failed: files opt-r2.O and $srcdir/opt-r2.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test opt-r2(F) may have failed." 1>&2;
+ $echo The command "cmp opt-r2.O $srcdir/opt-r2.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s opt-r2.E || rm -f opt-r2.E
+cat $srcdir/opt-r2.I | $xx -r -s '\._+' > opt-r2.O 2> opt-r2.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test opt-r2(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp opt-r2.O $srcdir/opt-r2.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed opt-r2(|)"; fi ;;
+ 1) $echo "Test opt-r2(|) failed: files opt-r2.O and $srcdir/opt-r2.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test opt-r2(|) may have failed." 1>&2;
+ $echo The command "cmp opt-r2.O $srcdir/opt-r2.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s opt-r2.E || rm -f opt-r2.E
+$xx -r -s '\._+' < $srcdir/opt-r2.I > opt-r2.O 2> opt-r2.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test opt-r2(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp opt-r2.O $srcdir/opt-r2.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed opt-r2(<)"; fi ;;
+ 1) $echo "Test opt-r2(<) failed: files opt-r2.O and $srcdir/opt-r2.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test opt-r2(<) may have failed." 1>&2;
+ $echo The command "cmp opt-r2.O $srcdir/opt-r2.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s opt-r2.E || rm -f opt-r2.E
$xx -b -r -s '\._+' $srcdir/opt-br.I > opt-br.O 2> opt-br.E
code=$?
if test $code != 0 ; then
@@ -783,8 +834,59 @@ else
esac
fi
test -s opt-br.E || rm -f opt-br.E
+$xx -b -r -s '\._+' $srcdir/opt-br2.I > opt-br2.O 2> opt-br2.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test opt-br2(F) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp opt-br2.O $srcdir/opt-br2.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed opt-br2(F)"; fi ;;
+ 1) $echo "Test opt-br2(F) failed: files opt-br2.O and $srcdir/opt-br2.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test opt-br2(F) may have failed." 1>&2;
+ $echo The command "cmp opt-br2.O $srcdir/opt-br2.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s opt-br2.E || rm -f opt-br2.E
+cat $srcdir/opt-br2.I | $xx -b -r -s '\._+' > opt-br2.O 2> opt-br2.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test opt-br2(|) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp opt-br2.O $srcdir/opt-br2.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed opt-br2(|)"; fi ;;
+ 1) $echo "Test opt-br2(|) failed: files opt-br2.O and $srcdir/opt-br2.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test opt-br2(|) may have failed." 1>&2;
+ $echo The command "cmp opt-br2.O $srcdir/opt-br2.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s opt-br2.E || rm -f opt-br2.E
+$xx -b -r -s '\._+' < $srcdir/opt-br2.I > opt-br2.O 2> opt-br2.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test opt-br2(<) failed: ../../src/tac return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp opt-br2.O $srcdir/opt-br2.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed opt-br2(<)"; fi ;;
+ 1) $echo "Test opt-br2(<) failed: files opt-br2.O and $srcdir/opt-br2.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test opt-br2(<) may have failed." 1>&2;
+ $echo The command "cmp opt-br2.O $srcdir/opt-br2.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s opt-br2.E || rm -f opt-br2.E
if test $errors = 0 ; then
- $echo Passed all 45 tests. 1>&2
+ $echo Passed all 51 tests. 1>&2
else
$echo Failed $errors tests. 1>&2
fi