]> thyrsus.com Git - src.git/commitdiff
Regression test for src diff.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 9 Nov 2014 21:02:49 +0000 (16:02 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 9 Nov 2014 21:02:49 +0000 (16:02 -0500)
srctest

diff --git a/srctest b/srctest
index f7952f3f870d6cb67047b3be526689b251eb1ec4..04e838d126ee498620c08c09d8c62bbd2aceac02 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -45,6 +45,17 @@ for all good men
 EOF
 cp testfile1 testrev2
 
+cat >testfile4 <<EOF
+@@ -1 +1,2 @@
+ Now is the time
++for all good men
+EOF
+
+# (read; read; cat) removes heasder lines containing variable date information
+src $TESTOPTS diff testfile1 | (read discard; read discard; cat) >testfile5
+diff -u testfile4 testfile5
+check "nonempty diff"
+
 echo "Second comment" | src $TESTOPTS commit - testfile1 >/dev/null
 check "commit with -"