summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-25 01:02:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-26 23:47:16 (GMT)
commit6b6cab3f9af2ab7010592e50bb343b990a6a7666 (patch)
treebab12c3b9f303728996eb86e7af2591b76a24f43 /t
parentdd555d8bed255c7949620e6551ea5afd2213bae0 (diff)
downloadgit-6b6cab3f9af2ab7010592e50bb343b990a6a7666.zip
git-6b6cab3f9af2ab7010592e50bb343b990a6a7666.tar.gz
git-6b6cab3f9af2ab7010592e50bb343b990a6a7666.tar.bz2
t0021: test application of both crlf and ident
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0021-conversion.sh32
1 files changed, 24 insertions, 8 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 275421e..f19e651 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -66,10 +66,14 @@ test_expect_success expanded_in_repo '
echo "\$Id:NoSpaceAtEitherEnd\$"
echo "\$Id: NoTerminatingSymbol"
echo "\$Id: Foreign Commit With Spaces \$"
- printf "\$Id: NoTerminatingSymbolAtEOF"
- } > expanded-keywords &&
+ } >expanded-keywords.0 &&
- git add expanded-keywords &&
+ {
+ cat expanded-keywords.0 &&
+ printf "\$Id: NoTerminatingSymbolAtEOF"
+ } >expanded-keywords &&
+ cat expanded-keywords >expanded-keywords-crlf &&
+ git add expanded-keywords expanded-keywords-crlf &&
git commit -m "File with keywords expanded" &&
id=$(git rev-parse --verify :expanded-keywords) &&
@@ -83,15 +87,27 @@ test_expect_success expanded_in_repo '
echo "\$Id: $id \$"
echo "\$Id: NoTerminatingSymbol"
echo "\$Id: Foreign Commit With Spaces \$"
+ } >expected-output.0 &&
+ {
+ cat expected-output.0 &&
printf "\$Id: NoTerminatingSymbolAtEOF"
- } > expected-output &&
+ } >expected-output &&
+ {
+ append_cr <expected-output.0 &&
+ printf "\$Id: NoTerminatingSymbolAtEOF"
+ } >expected-output-crlf &&
+ {
+ echo "expanded-keywords ident"
+ echo "expanded-keywords-crlf ident text eol=crlf"
+ } >>.gitattributes &&
- echo "expanded-keywords ident" >> .gitattributes &&
+ rm -f expanded-keywords expanded-keywords-crlf &&
- rm -f expanded-keywords &&
git checkout -- expanded-keywords &&
- cat expanded-keywords &&
- cmp expanded-keywords expected-output
+ test_cmp expanded-keywords expected-output &&
+
+ git checkout -- expanded-keywords-crlf &&
+ test_cmp expanded-keywords-crlf expected-output-crlf
'
# The use of %f in a filter definition is expanded to the path to