#!/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