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.
13 GIT_CEILING_DIRECTORIES
="$PWD" && export GIT_CEILING_DIRECTORIES
17 test_expect_success
'test setup' '
22 test_expect_success
'version' '
23 (cd norepo && test -n "$(tg version)") &&
24 (cd repo && test -n "$(tg version)")
27 test_expect_success
'precheck' '
28 (cd norepo && tg precheck) &&
29 (cd repo && tg precheck)
32 test_expect_success
'hook include' '
33 tg__include=1 && export tg__include &&
34 (cd norepo && test_might_fail tg 2>/dev/null) &&
38 test_expect_success
'hooks path' '
39 (cd norepo && test -d "$(tg --hooks-path)") &&
40 (cd repo && test -d "$(tg --hooks-path)")
43 test_expect_success
'help outside repo' '
47 tg --help >/dev/null &&
51 test_expect_success
'help inside repo' '
55 tg --help >/dev/null &&
59 test_expect_success
'bad options' '
62 test_must_fail tg --no-such-option &&
63 test_must_fail tg -r &&
64 test_must_fail tg -C &&
69 test_must_fail tg --no-such-option &&
70 test_must_fail tg -r &&
71 test_must_fail tg -C &&