add a test for patch which we currently fail
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
fa5e295600
commit
fe9403ad17
@ -175,6 +175,43 @@ abc
|
|||||||
123
|
123
|
||||||
" \
|
" \
|
||||||
|
|
||||||
|
# testing "test name" "command(s)" "expected result" "file input" "stdin"
|
||||||
|
testing "patch at the beginning" \
|
||||||
|
'patch 2>&1; cat input' \
|
||||||
|
"\
|
||||||
|
patching file input
|
||||||
|
111changed
|
||||||
|
444
|
||||||
|
555
|
||||||
|
666
|
||||||
|
777
|
||||||
|
888
|
||||||
|
999
|
||||||
|
" \
|
||||||
|
"\
|
||||||
|
111
|
||||||
|
222
|
||||||
|
333
|
||||||
|
444
|
||||||
|
555
|
||||||
|
666
|
||||||
|
777
|
||||||
|
888
|
||||||
|
999
|
||||||
|
" \
|
||||||
|
"\
|
||||||
|
--- input
|
||||||
|
+++ input
|
||||||
|
@@ -1,6 +1,4 @@
|
||||||
|
-111
|
||||||
|
-222
|
||||||
|
-333
|
||||||
|
+111changed
|
||||||
|
444
|
||||||
|
555
|
||||||
|
666
|
||||||
|
" \
|
||||||
|
|
||||||
rm input.orig 2>/dev/null
|
rm input.orig 2>/dev/null
|
||||||
|
|
||||||
exit $FAILCOUNT
|
exit $FAILCOUNT
|
||||||
|
@ -87,6 +87,7 @@ testing()
|
|||||||
|
|
||||||
$ECHO -ne "$3" > expected
|
$ECHO -ne "$3" > expected
|
||||||
$ECHO -ne "$4" > input
|
$ECHO -ne "$4" > input
|
||||||
|
[ -z "$VERBOSE" ] || echo ======================
|
||||||
[ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
|
[ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
|
||||||
[ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2"
|
[ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2"
|
||||||
$ECHO -ne "$5" | eval "$2" > actual
|
$ECHO -ne "$5" | eval "$2" > actual
|
||||||
|
Loading…
x
Reference in New Issue
Block a user