diff options
author | Jim Meyering <jim@meyering.net> | 2000-01-22 09:42:33 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-01-22 09:42:33 +0000 |
commit | 1a779705e88561cc716d46ff114dcbaca8af2be1 (patch) | |
tree | f536fd9288a4e23d180577aff54c21c873448703 /tests | |
parent | 6df5aa20d7a672599a44235bc4f364100e65f097 (diff) | |
download | coreutils-1a779705e88561cc716d46ff114dcbaca8af2be1.tar.xz |
.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tr/Makefile.am | 16 | ||||
-rw-r--r-- | tests/tr/Makefile.in | 16 | ||||
-rwxr-xr-x | tests/tr/tr-tests | 70 |
3 files changed, 85 insertions, 17 deletions
diff --git a/tests/tr/Makefile.am b/tests/tr/Makefile.am index 6cc92c10a..9ad94c5d6 100644 --- a/tests/tr/Makefile.am +++ b/tests/tr/Makefile.am @@ -8,19 +8,19 @@ maint_gen = 1.I 1.X 2.I 2.X 3.I 3.X 4.I 4.X 5.I 5.X 6.I 6.X 7.I 7.X 8.I 8.X \ i.X j.I j.X k.I k.X l.I l.X m.I m.X n.I n.X o.I o.X p.I p.X q.I q.X r.I r.X \ s.I s.X t.I t.X u.I u.X v.I v.X w.I w.X x.I x.X y.I y.X z.I z.X range-a-a.I \ range-a-a.X null.I null.X upcase.I upcase.X dncase.I dncase.X rep-cclass.I \ -rep-cclass.X rep-1.I rep-1.X rep-2.I rep-2.X rep-3.I rep-3.X esc.I esc.X \ -ross-0a.I ross-0a.X ross-0b.I ross-0b.X ross-1a.I ross-1a.X ross-1b.I \ -ross-1b.X ross-2.I ross-2.X ross-3.I ross-3.X ross-4.I ross-4.X ross-5.I \ -ross-5.X ross-6.I ross-6.X +rep-cclass.X rep-1.I rep-1.X rep-2.I rep-2.X rep-3.I rep-3.X o-rep-1.I \ +o-rep-1.X o-rep-2.I o-rep-2.X esc.I esc.X ross-0a.I ross-0a.X ross-0b.I \ +ross-0b.X ross-1a.I ross-1a.X ross-1b.I ross-1b.X ross-2.I ross-2.X ross-3.I \ +ross-3.X ross-4.I ross-4.X ross-5.I ross-5.X ross-6.I ross-6.X run_gen = 1.O 1.E 2.O 2.E 3.O 3.E 4.O 4.E 5.O 5.E 6.O 6.E 7.O 7.E 8.O 8.E 9.O \ 9.E a.O a.E b.O b.E c.O c.E d.O d.E e.O e.E f.O f.E g.O g.E h.O h.E i.O i.E \ j.O j.E k.O k.E l.O l.E m.O m.E n.O n.E o.O o.E p.O p.E q.O q.E r.O r.E s.O \ s.E t.O t.E u.O u.E v.O v.E w.O w.E x.O x.E y.O y.E z.O z.E range-a-a.O \ range-a-a.E null.O null.E upcase.O upcase.E dncase.O dncase.E rep-cclass.O \ -rep-cclass.E rep-1.O rep-1.E rep-2.O rep-2.E rep-3.O rep-3.E esc.O esc.E \ -ross-0a.O ross-0a.E ross-0b.O ross-0b.E ross-1a.O ross-1a.E ross-1b.O \ -ross-1b.E ross-2.O ross-2.E ross-3.O ross-3.E ross-4.O ross-4.E ross-5.O \ -ross-5.E ross-6.O ross-6.E +rep-cclass.E rep-1.O rep-1.E rep-2.O rep-2.E rep-3.O rep-3.E o-rep-1.O \ +o-rep-1.E o-rep-2.O o-rep-2.E esc.O esc.E ross-0a.O ross-0a.E ross-0b.O \ +ross-0b.E ross-1a.O ross-1a.E ross-1b.O ross-1b.E ross-2.O ross-2.E ross-3.O \ +ross-3.E ross-4.O ross-4.E ross-5.O ross-5.E ross-6.O ross-6.E ##test-files-end EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen) diff --git a/tests/tr/Makefile.in b/tests/tr/Makefile.in index c0563959b..1ca0039d5 100644 --- a/tests/tr/Makefile.in +++ b/tests/tr/Makefile.in @@ -111,20 +111,20 @@ maint_gen = 1.I 1.X 2.I 2.X 3.I 3.X 4.I 4.X 5.I 5.X 6.I 6.X 7.I 7.X 8.I 8.X \ i.X j.I j.X k.I k.X l.I l.X m.I m.X n.I n.X o.I o.X p.I p.X q.I q.X r.I r.X \ s.I s.X t.I t.X u.I u.X v.I v.X w.I w.X x.I x.X y.I y.X z.I z.X range-a-a.I \ range-a-a.X null.I null.X upcase.I upcase.X dncase.I dncase.X rep-cclass.I \ -rep-cclass.X rep-1.I rep-1.X rep-2.I rep-2.X rep-3.I rep-3.X esc.I esc.X \ -ross-0a.I ross-0a.X ross-0b.I ross-0b.X ross-1a.I ross-1a.X ross-1b.I \ -ross-1b.X ross-2.I ross-2.X ross-3.I ross-3.X ross-4.I ross-4.X ross-5.I \ -ross-5.X ross-6.I ross-6.X +rep-cclass.X rep-1.I rep-1.X rep-2.I rep-2.X rep-3.I rep-3.X o-rep-1.I \ +o-rep-1.X o-rep-2.I o-rep-2.X esc.I esc.X ross-0a.I ross-0a.X ross-0b.I \ +ross-0b.X ross-1a.I ross-1a.X ross-1b.I ross-1b.X ross-2.I ross-2.X ross-3.I \ +ross-3.X ross-4.I ross-4.X ross-5.I ross-5.X ross-6.I ross-6.X run_gen = 1.O 1.E 2.O 2.E 3.O 3.E 4.O 4.E 5.O 5.E 6.O 6.E 7.O 7.E 8.O 8.E 9.O \ 9.E a.O a.E b.O b.E c.O c.E d.O d.E e.O e.E f.O f.E g.O g.E h.O h.E i.O i.E \ j.O j.E k.O k.E l.O l.E m.O m.E n.O n.E o.O o.E p.O p.E q.O q.E r.O r.E s.O \ s.E t.O t.E u.O u.E v.O v.E w.O w.E x.O x.E y.O y.E z.O z.E range-a-a.O \ range-a-a.E null.O null.E upcase.O upcase.E dncase.O dncase.E rep-cclass.O \ -rep-cclass.E rep-1.O rep-1.E rep-2.O rep-2.E rep-3.O rep-3.E esc.O esc.E \ -ross-0a.O ross-0a.E ross-0b.O ross-0b.E ross-1a.O ross-1a.E ross-1b.O \ -ross-1b.E ross-2.O ross-2.E ross-3.O ross-3.E ross-4.O ross-4.E ross-5.O \ -ross-5.E ross-6.O ross-6.E +rep-cclass.E rep-1.O rep-1.E rep-2.O rep-2.E rep-3.O rep-3.E o-rep-1.O \ +o-rep-1.E o-rep-2.O o-rep-2.E esc.O esc.E ross-0a.O ross-0a.E ross-0b.O \ +ross-0b.E ross-1a.O ross-1a.E ross-1b.O ross-1b.E ross-2.O ross-2.E ross-3.O \ +ross-3.E ross-4.O ross-4.E ross-5.O ross-5.E ross-6.O ross-6.E EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen) diff --git a/tests/tr/tr-tests b/tests/tr/tr-tests index c7de7daea..af9b059df 100755 --- a/tests/tr/tr-tests +++ b/tests/tr/tr-tests @@ -1480,6 +1480,74 @@ else esac fi test -s rep-3.E || rm -f rep-3.E +cat $srcdir/o-rep-1.I | $xx '[b*08]' '[x*]' > o-rep-1.O 2> o-rep-1.E +code=$? +if test $code != 1 ; then + $echo "Test o-rep-1(|) failed: ../../src/tr return code $code differs from expected value 1" 1>&2 + errors=`expr $errors + 1` +else + cmp o-rep-1.O $srcdir/o-rep-1.X > /dev/null 2>&1 + case $? in + 0) if test "$VERBOSE" ; then $echo "passed o-rep-1(|)"; fi ;; + 1) $echo "Test o-rep-1(|) failed: files o-rep-1.O and $srcdir/o-rep-1.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test o-rep-1(|) may have failed." 1>&2; + $echo The command "cmp o-rep-1.O $srcdir/o-rep-1.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s o-rep-1.E || rm -f o-rep-1.E +$xx '[b*08]' '[x*]' < $srcdir/o-rep-1.I > o-rep-1.O 2> o-rep-1.E +code=$? +if test $code != 1 ; then + $echo "Test o-rep-1(<) failed: ../../src/tr return code $code differs from expected value 1" 1>&2 + errors=`expr $errors + 1` +else + cmp o-rep-1.O $srcdir/o-rep-1.X > /dev/null 2>&1 + case $? in + 0) if test "$VERBOSE" ; then $echo "passed o-rep-1(<)"; fi ;; + 1) $echo "Test o-rep-1(<) failed: files o-rep-1.O and $srcdir/o-rep-1.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test o-rep-1(<) may have failed." 1>&2; + $echo The command "cmp o-rep-1.O $srcdir/o-rep-1.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s o-rep-1.E || rm -f o-rep-1.E +cat $srcdir/o-rep-2.I | $xx '[b*010]cd' '[a*7]BC[x*]' > o-rep-2.O 2> o-rep-2.E +code=$? +if test $code != 0 ; then + $echo "Test o-rep-2(|) failed: ../../src/tr return code $code differs from expected value 0" 1>&2 + errors=`expr $errors + 1` +else + cmp o-rep-2.O $srcdir/o-rep-2.X > /dev/null 2>&1 + case $? in + 0) if test "$VERBOSE" ; then $echo "passed o-rep-2(|)"; fi ;; + 1) $echo "Test o-rep-2(|) failed: files o-rep-2.O and $srcdir/o-rep-2.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test o-rep-2(|) may have failed." 1>&2; + $echo The command "cmp o-rep-2.O $srcdir/o-rep-2.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s o-rep-2.E || rm -f o-rep-2.E +$xx '[b*010]cd' '[a*7]BC[x*]' < $srcdir/o-rep-2.I > o-rep-2.O 2> o-rep-2.E +code=$? +if test $code != 0 ; then + $echo "Test o-rep-2(<) failed: ../../src/tr return code $code differs from expected value 0" 1>&2 + errors=`expr $errors + 1` +else + cmp o-rep-2.O $srcdir/o-rep-2.X > /dev/null 2>&1 + case $? in + 0) if test "$VERBOSE" ; then $echo "passed o-rep-2(<)"; fi ;; + 1) $echo "Test o-rep-2(<) failed: files o-rep-2.O and $srcdir/o-rep-2.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test o-rep-2(<) may have failed." 1>&2; + $echo The command "cmp o-rep-2.O $srcdir/o-rep-2.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s o-rep-2.E || rm -f o-rep-2.E cat $srcdir/esc.I | $xx 'a\-z' 'A-Z' > esc.O 2> esc.E code=$? if test $code != 0 ; then @@ -1821,7 +1889,7 @@ else fi test -s ross-6.E || rm -f ross-6.E if test $errors = 0 ; then - $echo Passed all 106 tests. 1>&2 + $echo Passed all 110 tests. 1>&2 else $echo Failed $errors tests. 1>&2 fi |