testsh?.sh: fix sort(1) invocations

Newly imported sort(1) works slightly differently. In fact, the old
sort(1) had a bug and the tests invoked sort(1) the wrong way.
This commit is contained in:
Thomas Veerman 2012-12-07 15:44:22 +00:00
parent 1915403ff6
commit 11184894e2
2 changed files with 2 additions and 2 deletions

View file

@ -229,7 +229,7 @@ sort <x >x1
if cmp -s y x1; then : ; else echo Error on sort test 2; fi
sort -r <x1 >x2
if cmp -s x2 z; then : ; else echo Error on sort test 3; fi
sort +1 -n <x |head -1 >y
sort -k 2n <x |head -1 >y
echo "bibelot 3" >z
if cmp -s y z; then : ; else echo Error on sort test 4; fi

View file

@ -247,7 +247,7 @@ cat >answer <<END
END
prep x | sort | uniq -c >y1
sort +1 <y1 >y
sort <y1 >y
if cmp -s y answer; then : ; else echo Error in pipeline test 1; fi
cat $f $f $f | sort | uniq >x