Memorialize Python 3.7 support
[stgit.git] / t / t0004-main.sh
blob187d3e5481da7e4b4928cb63c0bb3ad20655b2e8
1 #!/bin/sh
3 test_description='Test stg.main'
5 . ./test-lib.sh
7 test_expect_success 'Test no command' '
8 general_error stg 2>&1 |
9 grep -e "usage:"
12 test_expect_success 'Test help/--help equivalence' '
13 stg help 2>&1 > h0.txt &&
14 stg --help 2>&1 > h1.txt &&
15 diff h0.txt h1.txt
18 test_expect_success 'Test help on invalid command' '
19 general_error stg help invalidcmd 2>&1 |
20 grep -e "Unknown command: invalidcmd"
23 test_expect_success 'Test help on regular command' '
24 stg help init | grep -e "Usage: stg init"
27 test_expect_success 'Test --help on regular command' '
28 stg --help refresh | grep -e "Usage: stg refresh"
31 test_expect_success 'Test help on alias command' '
32 stg help add | grep -e "Alias for \"git add"
35 test_expect_success 'Test help on ambiguous command' '
36 general_error stg help pu 2>&1 |
37 grep -e "Ambiguous command: pu"
40 test_expect_success 'Test version/--version equivalence' '
41 stg version > v0.txt &&
42 stg --version > v1.txt &&
43 diff v0.txt v1.txt &&
44 grep -e "Stacked GIT" v0.txt &&
45 grep -F "$(git --version)" v0.txt &&
46 grep -e "Python version" v0.txt
49 test_expect_success 'Test copyright' '
50 stg copyright | grep -e "This program is free software"
53 test_done