From 50aee995121a103fe2698574e7f1d56660a5b89b Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 18 Jan 2007 13:26:24 -0500 Subject: [PATCH] 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 --- t/t9300-fast-import.sh | 184 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100755 t/t9300-fast-import.sh 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 -- 2.26.2