summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-04-09 20:55:17 +0000
committerJim Meyering <jim@meyering.net>2003-04-09 20:55:17 +0000
commit160c7ab28e56ab5191a23c79ccc2875a5f78a010 (patch)
tree44c4f7c7ebb3ab53f3a7ba09cce0dfae1f7a91f7 /tests/misc
parent25b57f00147c26a336d0f8dd78aa48bab283a09a (diff)
downloadcoreutils-160c7ab28e56ab5191a23c79ccc2875a5f78a010.tar.xz
Make sure that a huge obsolete option evokes the right failure.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/split-fail11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/misc/split-fail b/tests/misc/split-fail
index 3b50234b0..247f4d475 100755
--- a/tests/misc/split-fail
+++ b/tests/misc/split-fail
@@ -6,6 +6,8 @@ if test "$VERBOSE" = yes; then
split --version
fi
+. $srcdir/../lang-default
+
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
@@ -44,4 +46,13 @@ split --bytes=$_4gb in || fail=1
# Of course, this is an artificial limit and should be fixed.
split --line-bytes=$_4gb 2> /dev/null in && fail=1
+# Make sure that a huge obsolete option evokes the right failure.
+env -u _POSIX2_VERSION split -99999999999999999991 2> out && fail=1
+cat <<\EOF > exp
+split: line count option -99999999999999999991... is too large
+EOF
+cmp out exp || fail=1
+test $fail = 1 && diff out exp 2> /dev/null
+
+
(exit $fail); exit $fail