X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft1200-tutorial.sh;h=eebe643bda9dd5180e8435a59c7510ba97e59144;hb=563b43ee45b87cf1e4bba99d3d0216f396d5c873;hp=8ff5dd92c9c731c11786669929e3a241c6371eb1;hpb=fec9ebf16c948bcb4a8b88d0173ee63584bcde76;p=git.git diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh index 8ff5dd92c..eebe643bd 100755 --- a/t/t1200-tutorial.sh +++ b/t/t1200-tutorial.sh @@ -3,7 +3,7 @@ # Copyright (c) 2005 Johannes Schindelin # -test_description='Test git-rev-parse with different parent options' +test_description='A simple turial in the form of a test case' . ./test-lib.sh @@ -37,8 +37,6 @@ test_expect_success 'tree' "test 8988da15d077d4829fc51d8544c097def6644dbb = $tre output="$(echo "Initial commit" | git-commit-tree $(git-write-tree) 2>&1 > .git/refs/heads/master)" -test_expect_success 'commit' "test 'Committing initial tree 8988da15d077d4829fc51d8544c097def6644dbb' = \"$output\"" - git-diff-index -p HEAD > diff.output test_expect_success 'git-diff-index -p HEAD' 'cmp diff.expect diff.output' @@ -49,7 +47,7 @@ test_expect_success 'git diff HEAD' 'cmp diff.expect diff.output' #test_expect_success 'git-read-tree --reset HEAD' "git-read-tree --reset HEAD ; test \"hello: needs update\" = \"$(git-update-index --refresh)\"" cat > whatchanged.expect << EOF -diff-tree VARIABLE (from root) +commit VARIABLE Author: VARIABLE Date: VARIABLE @@ -72,7 +70,7 @@ index 0000000..557db03 EOF git-whatchanged -p --root | \ - sed -e "1s/^\(.\{10\}\).\{40\}/\1VARIABLE/" \ + sed -e "1s/^\(.\{7\}\).\{40\}/\1VARIABLE/" \ -e "2,3s/^\(.\{8\}\).*$/\1VARIABLE/" \ > whatchanged.output test_expect_success 'git-whatchanged -p --root' 'cmp whatchanged.expect whatchanged.output' @@ -95,13 +93,13 @@ test_expect_success 'git branch' 'cmp branch.expect branch.output' git checkout mybranch echo "Work, work, work" >>hello -git commit -m 'Some work.' hello +git commit -m 'Some work.' -i hello git checkout master echo "Play, play, play" >>hello echo "Lots of fun" >>example -git commit -m 'Some fun.' hello example +git commit -m 'Some fun.' -i hello example test_expect_failure 'git resolve now fails' 'git resolve HEAD mybranch "Merge work in mybranch"' @@ -112,7 +110,9 @@ Play, play, play Work, work, work EOF -git commit -m 'Merged "mybranch" changes.' hello +git commit -m 'Merged "mybranch" changes.' -i hello + +test_done cat > show-branch.expect << EOF * [master] Merged "mybranch" changes. @@ -128,7 +128,7 @@ test_expect_success 'git show-branch' 'cmp show-branch.expect show-branch.output git checkout mybranch cat > resolve.expect << EOF -Updating from VARIABLE to VARIABLE. +Updating from VARIABLE to VARIABLE example | 1 + hello | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)