From 3f4ab627146fcb1e1887198f520f39fb84fde73a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 8 Aug 2011 11:51:00 -0700 Subject: [PATCH] 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 --- t/t1013-loose-object-format.sh | 2 -- t/t1020-subdirectory.sh | 2 -- t/t3902-quoted.sh | 2 -- t/t7800-difftool.sh | 3 --- t/test-lib.sh | 4 ++++ 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/t/t1013-loose-object-format.sh b/t/t1013-loose-object-format.sh index f45702c45c..0a9cedd374 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 f6a44c9ee0..7e79961228 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 da82b655b3..534ee08a44 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 4048d106d4..395adfc8a9 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 df25f17929..9d746b051c 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... -- GitLab