summaryrefslogtreecommitdiff
path: root/tests/sort
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-03-13 08:50:18 +0000
committerJim Meyering <jim@meyering.net>2001-03-13 08:50:18 +0000
commit5fface8d3a9d30341073915364bc2cf874c68bcf (patch)
tree10709cf774117816c410b1eaf3cd8836a2f61223 /tests/sort
parent7eaaae4ec0d40fe9d7d7193444e3c5d373113f58 (diff)
downloadcoreutils-5fface8d3a9d30341073915364bc2cf874c68bcf.tar.xz
.
Diffstat (limited to 'tests/sort')
-rw-r--r--tests/sort/Makefile.am7
-rw-r--r--tests/sort/Makefile.in7
-rwxr-xr-xtests/sort/sort-tests20
3 files changed, 27 insertions, 7 deletions
diff --git a/tests/sort/Makefile.am b/tests/sort/Makefile.am
index 5005ad967..e0f0876af 100644
--- a/tests/sort/Makefile.am
+++ b/tests/sort/Makefile.am
@@ -19,8 +19,8 @@ n10b.X n11a.I n11a.X n11b.I n11b.X 01a.I 01a.X 02a.I 02a.X 02b.I 02b.X 02c.I \
15c.X 15d.I 15d.X 15e.I 15e.X 16a.I 16a.X 17.I 17.X 18a.I 18a.X 18b.I 18b.X \
18c.I 18c.X 18d.I 18d.X 18e.I 18e.X 19a.I 19a.X 19b.I 19b.X 20a.I 20a.X 21a.I \
21a.X 21b.I 21b.X 21c.I 21c.X 21d.I 21d.X 21e.I 21e.X 21f.I 21f.X 21g.I 21g.X \
-22a.I 22a.X 22b.I 22b.X no-file1.X o-no-file1.X neg-nls.I neg-nls.X nul-nls.I \
-nul-nls.X use-nl.I use-nl.X
+22a.I 22a.X 22b.I 22b.X no-file1.X o-no-file1.X create-empty.X neg-nls.I \
+neg-nls.X nul-nls.I nul-nls.X use-nl.I use-nl.X
run_gen = n1.O n1.E n2.O n2.E n3.O n3.E n4.O n4.E n5.O n5.E n6.O n6.E n7.O \
n7.E n8a.O n8a.E n8b.O n8b.E n9a.O n9a.E n9b.O n9b.E n10a.O n10a.E n10b.O \
n10b.E n11a.O n11a.E n11b.O n11b.E 01a.O 01a.E 02a.O 02a.E 02b.O 02b.E 02c.O \
@@ -38,7 +38,8 @@ n10b.E n11a.O n11a.E n11b.O n11b.E 01a.O 01a.E 02a.O 02a.E 02b.O 02b.E 02c.O \
18c.O 18c.E 18d.O 18d.E 18e.O 18e.E 19a.O 19a.E 19b.O 19b.E 20a.O 20a.E 21a.O \
21a.E 21b.O 21b.E 21c.O 21c.E 21d.O 21d.E 21e.O 21e.E 21f.O 21f.E 21g.O 21g.E \
22a.O 22a.E 22b.O 22b.E no-file1.O no-file1.E o-no-file1.O o-no-file1.E \
-neg-nls.O neg-nls.E nul-nls.O nul-nls.E use-nl.O use-nl.E
+create-empty.O create-empty.E neg-nls.O neg-nls.E nul-nls.O nul-nls.E \
+use-nl.O use-nl.E
##test-files-end
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/sort/Makefile.in b/tests/sort/Makefile.in
index 133d6dc4c..0ce3624f4 100644
--- a/tests/sort/Makefile.in
+++ b/tests/sort/Makefile.in
@@ -137,8 +137,8 @@ n10b.X n11a.I n11a.X n11b.I n11b.X 01a.I 01a.X 02a.I 02a.X 02b.I 02b.X 02c.I \
15c.X 15d.I 15d.X 15e.I 15e.X 16a.I 16a.X 17.I 17.X 18a.I 18a.X 18b.I 18b.X \
18c.I 18c.X 18d.I 18d.X 18e.I 18e.X 19a.I 19a.X 19b.I 19b.X 20a.I 20a.X 21a.I \
21a.X 21b.I 21b.X 21c.I 21c.X 21d.I 21d.X 21e.I 21e.X 21f.I 21f.X 21g.I 21g.X \
-22a.I 22a.X 22b.I 22b.X no-file1.X o-no-file1.X neg-nls.I neg-nls.X nul-nls.I \
-nul-nls.X use-nl.I use-nl.X
+22a.I 22a.X 22b.I 22b.X no-file1.X o-no-file1.X create-empty.X neg-nls.I \
+neg-nls.X nul-nls.I nul-nls.X use-nl.I use-nl.X
run_gen = n1.O n1.E n2.O n2.E n3.O n3.E n4.O n4.E n5.O n5.E n6.O n6.E n7.O \
n7.E n8a.O n8a.E n8b.O n8b.E n9a.O n9a.E n9b.O n9b.E n10a.O n10a.E n10b.O \
@@ -157,7 +157,8 @@ n10b.E n11a.O n11a.E n11b.O n11b.E 01a.O 01a.E 02a.O 02a.E 02b.O 02b.E 02c.O \
18c.O 18c.E 18d.O 18d.E 18e.O 18e.E 19a.O 19a.E 19b.O 19b.E 20a.O 20a.E 21a.O \
21a.E 21b.O 21b.E 21c.O 21c.E 21d.O 21d.E 21e.O 21e.E 21f.O 21f.E 21g.O 21g.E \
22a.O 22a.E 22b.O 22b.E no-file1.O no-file1.E o-no-file1.O o-no-file1.E \
-neg-nls.O neg-nls.E nul-nls.O nul-nls.E use-nl.O use-nl.E
+create-empty.O create-empty.E neg-nls.O neg-nls.E nul-nls.O nul-nls.E \
+use-nl.O use-nl.E
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/sort/sort-tests b/tests/sort/sort-tests
index 97a9739aa..3ff2daa9b 100755
--- a/tests/sort/sort-tests
+++ b/tests/sort/sort-tests
@@ -1926,6 +1926,24 @@ else
esac
fi
test -s o-no-file1.E || rm -f o-no-file1.E
+$xx -o no/such/file /dev/null > create-empty.O 2> create-empty.E
+code=$?
+if test $code != 2; then
+ $echo "Test create-empty failed: ../../src/sort return code $code differs from expected value 2" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp create-empty.O $srcdir/create-empty.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE"; then $echo "passed create-empty"; fi;;
+ 1) $echo "Test create-empty failed: files create-empty.O and $srcdir/create-empty.X differ" 1>&2
+ (diff -c create-empty.O $srcdir/create-empty.X) 2> /dev/null
+ errors=`expr $errors + 1`;;
+ 2) $echo "Test create-empty may have failed." 1>&2
+ $echo The command "cmp create-empty.O $srcdir/create-empty.X" failed. 1>&2
+ errors=`expr $errors + 1`;;
+ esac
+fi
+test -s create-empty.E || rm -f create-empty.E
$xx -n $srcdir/neg-nls.I > neg-nls.O 2> neg-nls.E
code=$?
if test $code != 0; then
@@ -1981,7 +1999,7 @@ else
fi
test -s use-nl.E || rm -f use-nl.E
if test $errors = 0; then
- $echo Passed all 109 tests. 1>&2
+ $echo Passed all 110 tests. 1>&2
else
$echo Failed $errors tests. 1>&2
fi