From a3ec215973c3653ebdeb81dcdd1274519c376a3d Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sun, 21 Aug 2016 05:23:24 +0000 Subject: diffutils-3.5 --- tests/stdin | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tests/stdin (limited to 'tests/stdin') 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 < 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 -- cgit v1.2.1