From: Shawn O. Pearce Date: Thu, 18 Jan 2007 18:26:24 +0000 (-0500) Subject: Create test case for fast-import. X-Git-Tag: v1.5.0-rc4~14^2~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=50aee995121a103fe2698574e7f1d56660a5b89b;p=git.git Create test case for fast-import. Now that its easier to craft test cases (thanks to 'data <<') we should start to verify fast-import works as expected. Signed-off-by: Shawn O. Pearce --- diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh new file mode 100755 index 000000000..1463476b2 --- /dev/null +++ b/t/t9300-fast-import.sh @@ -0,0 +1,184 @@ +#!/bin/sh +# +# Copyright (c) 2007 Shawn Pearce +# + +test_description='test git-fast-import utility' +. ./test-lib.sh +. ../diff-lib.sh ;# test-lib chdir's into trash + +### +### series A +### + +test_tick +cat >input < $GIT_COMMITTER_DATE +data <expect < $GIT_COMMITTER_DATE +committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + +initial +EOF +test_expect_success \ + 'A: verify commit' \ + 'git-cat-file commit master | sed 1d >actual && + diff -u expect actual' + +cat >expect <actual && + diff -u expect actual' + +cat >expect <actual && diff -u expect actual' + +cat >expect <actual && diff -u expect actual' + +printf abcd >expect +test_expect_success \ + 'A: verify file4' \ + 'git-cat-file blob master:file4 >actual && diff -u expect actual' + +cat >expect <input < $GIT_COMMITTER_DATE +data <input < $GIT_COMMITTER_DATE +data <expect < $GIT_COMMITTER_DATE +committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + +second +EOF +test_expect_success \ + 'C: verify commit' \ + 'git-cat-file commit branch | sed 1d >actual && + diff -u expect actual' + +cat >expect <actual +test_expect_success \ + 'C: validate rename result' \ + 'compare_diff_raw expect actual' + +test_done