X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft9300-fast-import.sh;h=0595041af5d310f905306c6a289945cde26d88fc;hb=da0204df587ae76cd291bc7e495fc60d873c2f20;hp=2e1a09ff2db29421629b038a3374449c49bdc79d;hpb=e286114d0edbed846149227d48f75338fea760e5;p=git.git diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 2e1a09ff2..0595041af 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -60,10 +60,10 @@ INPUT_END test_expect_success \ 'A: create pack from stdin' \ 'git-fast-import --export-marks=marks.out expect < $GIT_COMMITTER_DATE @@ -73,8 +73,8 @@ initial EOF test_expect_success \ 'A: verify commit' \ - 'git-cat-file commit master | sed 1d >actual && - diff -u expect actual' + 'git cat-file commit master | sed 1d >actual && + git diff expect actual' cat >expect <expect <actual && - diff -u expect actual' + 'git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual && + git diff expect actual' echo "$file2_data" >expect test_expect_success \ 'A: verify file2' \ - 'git-cat-file blob master:file2 >actual && diff -u expect actual' + 'git cat-file blob master:file2 >actual && git diff expect actual' echo "$file3_data" >expect test_expect_success \ 'A: verify file3' \ - 'git-cat-file blob master:file3 >actual && diff -u expect actual' + 'git cat-file blob master:file3 >actual && git diff expect actual' printf "$file4_data" >expect test_expect_success \ 'A: verify file4' \ - 'git-cat-file blob master:file4 >actual && diff -u expect actual' + 'git cat-file blob master:file4 >actual && git diff expect actual' cat >expect <input < $GIT_COMMITTER_DATE +data <expect <actual +test_expect_success \ + 'A: verify diff' \ + 'compare_diff_raw expect actual && + test `git rev-parse --verify master:file2` \ + = `git rev-parse --verify verify--import-marks:copy-of-file2`' ### ### series B @@ -141,12 +170,59 @@ test_expect_failure \ 'git-fast-import input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +data <input <expect < $GIT_COMMITTER_DATE committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE @@ -182,15 +258,15 @@ second EOF test_expect_success \ 'C: verify commit' \ - 'git-cat-file commit branch | sed 1d >actual && - diff -u expect actual' + 'git cat-file commit branch | sed 1d >actual && + git diff expect actual' cat >expect <actual +git diff-tree -M -r master branch >actual test_expect_success \ 'C: validate rename result' \ 'compare_diff_raw expect actual' @@ -222,16 +298,16 @@ INPUT_END test_expect_success \ 'D: inline data in commit' \ 'git-fast-import expect <actual +git diff-tree -M -r branch^ branch >actual test_expect_success \ 'D: validate new files added' \ 'compare_diff_raw expect actual' @@ -239,14 +315,14 @@ test_expect_success \ echo "$file5_data" >expect test_expect_success \ 'D: verify file5' \ - 'git-cat-file blob branch:newdir/interesting >actual && - diff -u expect actual' + 'git cat-file blob branch:newdir/interesting >actual && + git diff expect actual' echo "$file6_data" >expect test_expect_success \ 'D: verify file6' \ - 'git-cat-file blob branch:newdir/exec.sh >actual && - diff -u expect actual' + 'git cat-file blob branch:newdir/exec.sh >actual && + git diff expect actual' ### ### series E @@ -271,7 +347,7 @@ test_expect_success \ 'git-fast-import --date-format=rfc2822 expect < 1170778938 -0500 @@ -281,14 +357,14 @@ RFC 2822 type date EOF test_expect_success \ 'E: verify commit' \ - 'git-cat-file commit branch | sed 1,2d >actual && - diff -u expect actual' + 'git cat-file commit branch | sed 1,2d >actual && + git diff expect actual' ### ### series F ### -old_branch=`git-rev-parse --verify branch^0` +old_branch=`git rev-parse --verify branch^0` test_tick cat >input <expect < $GIT_COMMITTER_DATE committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE @@ -334,14 +410,14 @@ losing things already? EOF test_expect_success \ 'F: verify other commit' \ - 'git-cat-file commit other >actual && - diff -u expect actual' + 'git cat-file commit other >actual && + git diff expect actual' ### ### series G ### -old_branch=`git-rev-parse --verify branch^0` +old_branch=`git rev-parse --verify branch^0` test_tick cat >input <expect <expect <actual +git diff-tree -M -r H^ H >actual test_expect_success \ 'H: validate old files removed, new files added' \ 'compare_diff_raw expect actual' @@ -412,8 +488,8 @@ test_expect_success \ echo "$file5_data" >expect test_expect_success \ 'H: verify file' \ - 'git-cat-file blob H:h/e/l/lo >actual && - diff -u expect actual' + 'git cat-file blob H:h/e/l/lo >actual && + git diff expect actual' ### ### series I @@ -434,12 +510,12 @@ test_expect_success \ 'git-fast-import --export-pack-edges=edges.list expect <actual && - diff -u expect actual' + git diff expect actual' ### ### series J @@ -468,7 +544,7 @@ test_expect_success \ 'git-fast-import input < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data <expect <output && + git diff expect output' + +### +### series M +### + +test_tick +cat >input < $GIT_COMMITTER_DATE +data <expect <actual && + compare_diff_raw expect actual' + +cat >input < $GIT_COMMITTER_DATE +data <expect <actual && + compare_diff_raw expect actual' + +cat >input < $GIT_COMMITTER_DATE +data <expect <actual && + compare_diff_raw expect actual' + +### +### series N +### + +test_tick +cat >input < $GIT_COMMITTER_DATE +data <expect <actual && + compare_diff_raw expect actual' + +cat >input < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data <expect <actual && + compare_diff_raw expect actual' + +cat >input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +# $GIT_COMMITTER_NAME has inserted here for his benefit. +data <input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data <expect <actual && + git diff expect actual' + +cat >input < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data < $GIT_COMMITTER_DATE +data <actual && + grep "progress " expect && + git diff expect actual' test_done