Remove the server-/client- prefixes in the tests.
[git-central.git] / tests / t1000-commit-msg-trac.sh
1 #!/bin/sh
2
3 test_description='client commit-msg trac ticket enforcer'
4
5 . ./test-lib.sh
6
7 # setup the commit-msg hook
8 install_client_hook 'commit-msg-trac' 'commit-msg'
9
10 test_expect_success 'rejects with bad message' '
11         echo "$test_name" >file &&
12         git add file &&
13         ! git commit -m "first"
14 '
15
16 test_expect_success 'rejects with re:' '
17         echo "$test_name" >file &&
18         git add file &&
19         ! git commit -m "first re: #3200"
20 '
21
22 test_expect_success 'rejects with re no space' '
23         echo "$test_name" >file &&
24         git add file &&
25         ! git commit -m "first re#3200"
26 '
27
28 test_expect_success 'accepts with re' '
29         echo "$test_name" >file &&
30         git add file &&
31         git commit -m "first re #3200"
32 '
33
34 test_expect_success 'accepts with re on the second line' '
35         echo "$test_name" >file &&
36         git add file &&
37         echo "line one" >msg &&
38         echo "line two re #3200" >>msg &&
39         git commit -F msg
40 '
41
42 test_expect_success 'accepts with RE' '
43         echo "$test_name" >file &&
44         git add file &&
45         git commit -m "first RE #3200"
46 '
47
48 test_expect_success 'accepts with refs' '
49         echo "$test_name" >file &&
50         git add file &&
51         git commit -m "first refs #3200"
52 '
53
54 test_expect_success 'accepts with qa' '
55         echo "$test_name" >file &&
56         git add file &&
57         git commit -m "first qa #3200"
58 '
59
60 test_expect_success 'accepts with no ticket' '
61         echo "$test_name" >file &&
62         git add file &&
63         git commit -m "first no ticket"
64 '
65
66 test_done
67