X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft9300-fast-import.sh;h=5edf56f198dc25b9db47ff363fe49958e5299162;hb=e896912c5edb8f989a2d25e101b2eb14f1a56aa9;hp=72e49f5d3bebcf6509536c578cc934879ee1aa55;hpb=cdd5b82ee8e6941eee9c7b09df63c44789fd5c4b;p=git.git
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 72e49f5d3..5edf56f19 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 &&
- git diff expect actual'
+ 'git cat-file commit master | sed 1d >actual &&
+ test_cmp expect actual'
cat >expect <expect <actual &&
- git diff expect actual'
+ 'git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
+ test_cmp 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 && test_cmp 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 && test_cmp 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 && test_cmp expect actual'
cat >expect <input <expect <actual
+git diff-tree -M -r master verify--import-marks >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`'
+ test `git rev-parse --verify master:file2` \
+ = `git rev-parse --verify verify--import-marks:copy-of-file2`'
###
### series B
@@ -165,17 +165,64 @@ from refs/heads/master
M 755 0000000000000000000000000000000000000001 zero1
INPUT_END
-test_expect_failure \
- 'B: fail on invalid blob sha1' \
- '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
@@ -211,15 +258,15 @@ second
EOF
test_expect_success \
'C: verify commit' \
- 'git-cat-file commit branch | sed 1d >actual &&
- git diff expect actual'
+ 'git cat-file commit branch | sed 1d >actual &&
+ test_cmp 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'
@@ -251,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'
@@ -268,14 +315,14 @@ test_expect_success \
echo "$file5_data" >expect
test_expect_success \
'D: verify file5' \
- 'git-cat-file blob branch:newdir/interesting >actual &&
- git diff expect actual'
+ 'git cat-file blob branch:newdir/interesting >actual &&
+ test_cmp expect actual'
echo "$file6_data" >expect
test_expect_success \
'D: verify file6' \
- 'git-cat-file blob branch:newdir/exec.sh >actual &&
- git diff expect actual'
+ 'git cat-file blob branch:newdir/exec.sh >actual &&
+ test_cmp expect actual'
###
### series E
@@ -292,15 +339,15 @@ COMMIT
from refs/heads/branch^0
INPUT_END
-test_expect_failure \
- 'E: rfc2822 date, --date-format=raw' \
- 'git-fast-import --date-format=raw expect < 1170778938 -0500
@@ -310,14 +357,14 @@ RFC 2822 type date
EOF
test_expect_success \
'E: verify commit' \
- 'git-cat-file commit branch | sed 1,2d >actual &&
- git diff expect actual'
+ 'git cat-file commit branch | sed 1,2d >actual &&
+ test_cmp 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
@@ -363,14 +410,14 @@ losing things already?
EOF
test_expect_success \
'F: verify other commit' \
- 'git-cat-file commit other >actual &&
- git diff expect actual'
+ 'git cat-file commit other >actual &&
+ test_cmp 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'
@@ -441,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 &&
- git diff expect actual'
+ 'git cat-file blob H:h/e/l/lo >actual &&
+ test_cmp expect actual'
###
### series I
@@ -463,12 +510,12 @@ test_expect_success \
'git-fast-import --export-pack-edges=edges.list expect <actual &&
- git diff expect actual'
+ test_cmp expect actual'
###
### series J
@@ -497,7 +544,7 @@ test_expect_success \
'git-fast-import output &&
- git diff expect output'
+ git diff-tree --abbrev --raw L^ L >output &&
+ test_cmp 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 &&
+ test_cmp expect actual'
+
+cat >input < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data <actual &&
+ grep "progress " expect &&
+ test_cmp expect actual'
test_done