From: Jonathan Nieder Date: Sun, 25 Aug 2013 07:09:11 GMT Subject: Re: [PATCH 3/3] t/t7106-reset-unborn-branch.sh: Add PERL prerequisite Message-ID: <20130825070911.GU2882@elie.Belkin> In-Reply-To: Junio C Hamano wrote: > The change to the one that feeds 'y' to "reset -p" may be a bit too > pedantic, as we are not in the business of testing "echo y", though. Yeah, that's true. Here's a patch for squashing in. diff --git i/t/t7106-reset-unborn-branch.sh w/t/t7106-reset-unborn-branch.sh index af00ab4d..bd28feba 100755 --- i/t/t7106-reset-unborn-branch.sh +++ w/t/t7106-reset-unborn-branch.sh @@ -12,9 +12,8 @@ test_expect_success 'reset' ' git add a b && git reset && - >expect && git ls-files >actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success 'reset HEAD' ' @@ -36,12 +35,10 @@ test_expect_success 'reset $file' ' test_expect_success PERL 'reset -p' ' rm .git/index && git add a && - echo y >yes && - git reset -p expect && git ls-files >actual && - test_cmp expect actual + test_must_be_empty actual ' test_expect_success 'reset --soft is a no-op' ' @@ -60,9 +57,8 @@ test_expect_success 'reset --hard' ' test_when_finished "echo a >a" && git reset --hard && - >expect && git ls-files >actual && - test_cmp expect actual && + test_must_be_empty actual && test_path_is_missing a '