提交 3f4ab627 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 7f684a2a
...@@ -26,8 +26,6 @@ standard format, deflated with 4KB window size: Agit/JGit on Android ...@@ -26,8 +26,6 @@ standard format, deflated with 4KB window size: Agit/JGit on Android
' '
. ./test-lib.sh . ./test-lib.sh
LF='
'
assert_blob_equals() { assert_blob_equals() {
printf "%s" "$2" >expected && printf "%s" "$2" >expected &&
......
...@@ -17,8 +17,6 @@ test_expect_success setup ' ...@@ -17,8 +17,6 @@ test_expect_success setup '
cp one original.one && cp one original.one &&
cp dir/two original.two cp dir/two original.two
' '
LF='
'
test_expect_success 'update-index and ls-files' ' test_expect_success 'update-index and ls-files' '
git update-index --add one && git update-index --add one &&
......
...@@ -10,8 +10,6 @@ test_description='quoted output' ...@@ -10,8 +10,6 @@ test_description='quoted output'
FN='濱野' FN='濱野'
GN='純' GN='純'
HT=' ' HT=' '
LF='
'
DQ='"' DQ='"'
echo foo 2>/dev/null > "Name and an${HT}HT" echo foo 2>/dev/null > "Name and an${HT}HT"
......
...@@ -10,9 +10,6 @@ Testing basic diff tool invocation ...@@ -10,9 +10,6 @@ Testing basic diff tool invocation
. ./test-lib.sh . ./test-lib.sh
LF='
'
remove_config_vars() remove_config_vars()
{ {
# Unset all config variables used by git-difftool # Unset all config variables used by git-difftool
......
...@@ -92,6 +92,10 @@ _x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05" ...@@ -92,6 +92,10 @@ _x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x05$_x05"
# Zero SHA-1 # Zero SHA-1
_z40=0000000000000000000000000000000000000000 _z40=0000000000000000000000000000000000000000
# Line feed
LF='
'
# Each test should start with something like this, after copyright notices: # Each test should start with something like this, after copyright notices:
# #
# test_description='Description of this test... # test_description='Description of this test...
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册