3 test_description
='basic tg do-nothing commands work anywhere
5 The basic `tg version` `tg precheck` and friends should all work just fine
6 in or not in a Git repository without complaint.
15 test_expect_success
'test setup' '
20 test_expect_success
'version' '
21 (cd norepo && test -n "$(tg version)") &&
22 (cd repo && test -n "$(tg version)")
25 test_expect_success
'precheck' '
26 (cd norepo && tg precheck) &&
27 (cd repo && tg precheck)
30 test_expect_success
'hook include' '
31 tg__include=1 && export tg__include &&
32 (cd norepo && test_might_fail tg 2>/dev/null) &&
36 test_expect_success
'hooks path' '
37 (cd norepo && test -d "$(tg --hooks-path)") &&
38 (cd repo && test -d "$(tg --hooks-path)")
41 test_expect_success
'help outside repo' '
45 tg --help >/dev/null &&
49 test_expect_success
'help inside repo' '
53 tg --help >/dev/null &&
57 test_expect_success
'bad options' '
60 test_must_fail tg --no-such-option &&
61 test_must_fail tg -r &&
62 test_must_fail tg -C &&
67 test_must_fail tg --no-such-option &&
68 test_must_fail tg -r &&
69 test_must_fail tg -C &&