X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9300-fast-import.sh;h=0595041af5d310f905306c6a289945cde26d88fc;hb=467f42cfa1d298dcaab40e06f8dfa8f80ee345f7;hp=8e958da5361f69e47a27833948eed0bd7dc8b32e;hpb=e8811929344c46aed7669e148527af054eb3e18b;p=git.git diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 8e958da53..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,7 +73,7 @@ initial EOF test_expect_success \ 'A: verify commit' \ - 'git-cat-file commit master | sed 1d >actual && + 'git cat-file commit master | sed 1d >actual && git diff expect actual' cat >expect <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 && git diff 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 && git diff 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 && git diff 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,7 +258,7 @@ second EOF test_expect_success \ 'C: verify commit' \ - 'git-cat-file commit branch | sed 1d >actual && + 'git cat-file commit branch | sed 1d >actual && git diff expect actual' cat >expect <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,13 +315,13 @@ test_expect_success \ echo "$file5_data" >expect test_expect_success \ 'D: verify file5' \ - 'git-cat-file blob branch:newdir/interesting >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 && + 'git cat-file blob branch:newdir/exec.sh >actual && git diff expect actual' ### @@ -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 && + '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 && + '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,7 +488,7 @@ test_expect_success \ echo "$file5_data" >expect test_expect_success \ 'H: verify file' \ - 'git-cat-file blob H:h/e/l/lo >actual && + 'git cat-file blob H:h/e/l/lo >actual && git diff expect actual' ### @@ -434,7 +510,7 @@ test_expect_success \ 'git-fast-import --export-pack-edges=edges.list expect <output && + git diff-tree --abbrev --raw L^ L >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