README_DOCS.rst: update tg prev and tg next usage summary
[topgit/pro.git] / t / t0000-itworks.sh
blob114d12882963ae2955a28b91d8af0b07091b5276
1 #!/bin/sh
3 TEST_NO_CREATE_REPO=1
5 test_description='Test sanity of test framework
7 1 - it works
9 Just a basic test that always succeeds
11 2 - it works on stdin
13 Another basic test but read using the magic -
15 3 - empty test fails
17 An empty test script does not change the exit code and
18 the testing library arranges for the exit code to be 1
19 at the beginning of the test so an empty test should
20 always fail
22 4 - git rev-parse --git-dir fails
24 GIT_CEILING_DIRECTORIES should be set properly to avoid
25 finding the repository containing the tests themselves
26 so verify that it does indeed fail.
29 . ./test-lib.sh
31 test_plan 4
33 test_expect_success 'it works' ':'
34 test_expect_success 'it works on stdin' - <<-'EOT'
35 : && # no more quoting issues but 'tis a bit slower!
36 : # unpaired " are allowed too!
37 EOT
38 test_expect_failure 'empty test fails' ''
39 test_expect_success 'git rev-parse --git-dir fails' '
40 test_must_fail git rev-parse --git-dir
43 test_done