diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-08-21 05:23:24 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-08-21 05:23:24 +0000 |
commit | a3ec215973c3653ebdeb81dcdd1274519c376a3d (patch) | |
tree | dc0edc2133786db0565f19d51c4a9957dd69e2ac /tests/stdin | |
download | diffutils-tarball-master.tar.gz |
diffutils-3.5HEADdiffutils-3.5master
Diffstat (limited to 'tests/stdin')
-rwxr-xr-x | tests/stdin | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/stdin b/tests/stdin new file mode 100755 index 0000000..295e98d --- /dev/null +++ b/tests/stdin @@ -0,0 +1,24 @@ +#!/bin/sh +# Ensure that "-" means "standard input". + +. "${srcdir=.}/init.sh"; path_prepend_ ../src + +fail=0 + +cat <<EOF > exp || fail=1 +--- - ++++ b +@@ -1 +1 @@ +-a ++b +EOF + +echo a > a +echo b > b + +diff -u - b < a > out 2> err; test $? = 1 || fail=1 +# Remove date and time. +sed -e 's/^\([-+*][-+*][-+*] [^ ]*\) .*/\1/' out > k; mv k out +compare exp out || fail=1 + +Exit $fail |