From: Shawn O. Pearce Date: Thu, 18 Jan 2007 19:49:05 +0000 (-0500) Subject: Reduce value duplication in t9300-fast-import. X-Git-Tag: v1.5.0-rc4~14^2~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8232dc427fb4b92b38e74e9e93b52231a67e354f;p=git.git Reduce value duplication in t9300-fast-import. It is error prone to list the value of each file twice, instead we should list the value only once early in the script and reuse the shell variable when we need to access it. Signed-off-by: Shawn O. Pearce --- diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 1463476b2..40b8c073b 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -7,6 +7,16 @@ test_description='test git-fast-import utility' . ./test-lib.sh . ../diff-lib.sh ;# test-lib chdir's into trash +file2_data='file2 +second line of EOF' + +file3_data='EOF +in 3rd file + END' + +file4_data=abcd +file4_len=4 + ### ### series A ### @@ -16,22 +26,19 @@ cat >input < $GIT_COMMITTER_DATE @@ -73,24 +80,17 @@ test_expect_success \ 'git-cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual && diff -u expect actual' -cat >expect <expect test_expect_success \ 'A: verify file2' \ 'git-cat-file blob master:file2 >actual && diff -u expect actual' -cat >expect <expect test_expect_success \ 'A: verify file3' \ 'git-cat-file blob master:file3 >actual && diff -u expect actual' -printf abcd >expect +printf "$file4_data" >expect test_expect_success \ 'A: verify file4' \ 'git-cat-file blob master:file4 >actual && diff -u expect actual'