Skip to content

Commit 3f4ab62

Browse files
committed
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 <[email protected]>
1 parent 7f684a2 commit 3f4ab62

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

t/t1013-loose-object-format.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ standard format, deflated with 4KB window size: Agit/JGit on Android
2626
'
2727

2828
. ./test-lib.sh
29-
LF='
30-
'
3129

3230
assert_blob_equals() {
3331
printf "%s" "$2" >expected &&

t/t1020-subdirectory.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ test_expect_success setup '
1717
cp one original.one &&
1818
cp dir/two original.two
1919
'
20-
LF='
21-
'
2220

2321
test_expect_success 'update-index and ls-files' '
2422
git update-index --add one &&

t/t3902-quoted.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ test_description='quoted output'
1010
FN='濱野'
1111
GN=''
1212
HT=' '
13-
LF='
14-
'
1513
DQ='"'
1614

1715
echo foo 2>/dev/null > "Name and an${HT}HT"

t/t7800-difftool.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ Testing basic diff tool invocation
1010

1111
. ./test-lib.sh
1212

13-
LF='
14-
'
15-
1613
remove_config_vars()
1714
{
1815
# Unset all config variables used by git-difftool

t/test-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ _x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
9292
# Zero SHA-1
9393
_z40=0000000000000000000000000000000000000000
9494

95+
# Line feed
96+
LF='
97+
'
98+
9599
# Each test should start with something like this, after copyright notices:
96100
#
97101
# test_description='Description of this test...

0 commit comments

Comments
 (0)