summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-22 07:06:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-22 07:06:44 (GMT)
commitf8b6809d52992ad14d035bcf7c8d8cfe00ef45a0 (patch)
treedc30997d91721ddbc4e92233b1bf493443bf55dd /t
parentd794d9e70ebb8c767b04f25c03290ef305cd31ab (diff)
downloadgit-f8b6809d52992ad14d035bcf7c8d8cfe00ef45a0.zip
git-f8b6809d52992ad14d035bcf7c8d8cfe00ef45a0.tar.gz
git-f8b6809d52992ad14d035bcf7c8d8cfe00ef45a0.tar.bz2
Fix "quote" misconversion for rewrite diff output.
663af3422a648e87945e4d8c0cc3e13671f2bbde (Full rework of quote_c_style and write_name_quoted.) mistakenly used puts() when writing out a fixed string when it did not want to add a terminating LF. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4022-diff-rewrite.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t4022-diff-rewrite.sh b/t/t4022-diff-rewrite.sh
new file mode 100755
index 0000000..6de4acb
--- /dev/null
+++ b/t/t4022-diff-rewrite.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+test_description='rewrite diff'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ cat ../../COPYING >test &&
+ git add test &&
+ tr 'a-zA-Z' 'n-za-mN-ZA-M' <../../COPYING >test
+
+'
+
+test_expect_success 'detect rewrite' '
+
+ actual=$(git diff-files -B --summary test) &&
+ expr "$actual" : " rewrite test ([0-9]*%)$" || {
+ echo "Eh? <<$actual>>"
+ false
+ }
+
+'
+
+test_done
+