summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-08 11:51:00 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-11 13:02:47 -0700
commit3f4ab627146fcb1e1887198f520f39fb84fde73a (patch)
treee0b26610ba632f8c55d857e2a5620550c749f872 /t
parent7f684a2aff636f44a5063c05cf84c0db0460ae1a (diff)
downloadgit-3f4ab627146fcb1e1887198f520f39fb84fde73a.tar.gz
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 <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1013-loose-object-format.sh2
-rwxr-xr-xt/t1020-subdirectory.sh2
-rwxr-xr-xt/t3902-quoted.sh2
-rwxr-xr-xt/t7800-difftool.sh3
-rw-r--r--t/test-lib.sh4
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...