@matheusbsbs / matheus-bagliano / commits / 5d9e8ee78b
Fork 0

t3200: git-branch testsuite update

The test expected "git branch --help" to exit successfully, but built-ins spawn "man" when given --help, and when the test is run, manpages may not be installed yet and "man" can legally exit non-zero in such a case. Also the new implementation logs "Created from master", instead of "Created from HEAD" in the reflog, which makes a lot more sense, so adjust the test to match that. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Oct 23, 2006 at 22:48 UTC 5d9e8ee78b1df7a9c1b2d13c2b58628201f01f72
1 file changed +3 -6
t/t3200-branch.sh
+3 -6
@@ -17,13 +17,10 @@ test_expect_success \
17 git-commit -m "Initial commit." &&
18 HEAD=$(git-rev-parse --verify HEAD)'
19
20 -test_expect_success \
21 - 'git branch --help should return success now.' \
22 - 'git-branch --help'
23 -
20 test_expect_failure \
21 'git branch --help should not have created a bogus branch' \
26 - 'test -f .git/refs/heads/--help'
22 + 'git-branch --help </dev/null >/dev/null 2>/dev/null || :
23 + test -f .git/refs/heads/--help'
24
25 test_expect_success \
26 'git branch abc should create a branch' \
@@ -34,7 +31,7 @@ test_expect_success \
31 'git-branch a/b/c && test -f .git/refs/heads/a/b/c'
32
33 cat >expect <<EOF
37 -0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from HEAD
34 +0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
35 EOF
36 test_expect_success \
37 'git branch -l d/e/f should create a branch and a log' \