From: Junio C Hamano Date: Mon, 8 Aug 2011 18:51:00 +0000 (-0700) Subject: test: consolidate definition of $LF X-Git-Tag: v1.7.7-rc0~13^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3f4ab627146fcb1e1887198f520f39fb84fde73a;p=git.git test: consolidate definition of $LF As we seem to need this variable that holds a single LF character in many places, define it in test-lib.sh and let the test scripts use it. Signed-off-by: Junio C Hamano --- diff --git a/t/t1013-loose-object-format.sh b/t/t1013-loose-object-format.sh index f45702c45..0a9cedd37 100755 --- a/t/t1013-loose-object-format.sh +++ b/t/t1013-loose-object-format.sh @@ -26,8 +26,6 @@ standard format, deflated with 4KB window size: Agit/JGit on Android ' . ./test-lib.sh -LF=' -' assert_blob_equals() { printf "%s" "$2" >expected && diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh index f6a44c9ee..7e7996122 100755 --- a/t/t1020-subdirectory.sh +++ b/t/t1020-subdirectory.sh @@ -17,8 +17,6 @@ test_expect_success setup ' cp one original.one && cp dir/two original.two ' -LF=' -' test_expect_success 'update-index and ls-files' ' git update-index --add one && diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh index da82b655b..534ee08a4 100755 --- a/t/t3902-quoted.sh +++ b/t/t3902-quoted.sh @@ -10,8 +10,6 @@ test_description='quoted output' FN='濱野' GN='純' HT=' ' -LF=' -' DQ='"' echo foo 2>/dev/null > "Name and an${HT}HT" diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index 4048d106d..395adfc8a 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -10,9 +10,6 @@ Testing basic diff tool invocation . ./test-lib.sh -LF=' -' - remove_config_vars() { # Unset all config variables used by git-difftool diff --git a/t/test-lib.sh b/t/test-lib.sh index df25f1792..9d746b051 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -92,6 +92,10 @@ _x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05" # Zero SHA-1 _z40=0000000000000000000000000000000000000000 +# Line feed +LF=' +' + # Each test should start with something like this, after copyright notices: # # test_description='Description of this test...