3 test_description='client commit-msg ticket enforcer'
7 # setup the commit-msg hook
8 install_client_hook 'commit-msg' 'commit-msg'
10 test_expect_success 'rejects with bad message' '
11 echo "$test_name" > file &&
13 ! git commit -m "first"
16 test_expect_success 'rejects with re:' '
17 echo "$test_name" > file &&
19 ! git commit -m "first re: #3200"
22 test_expect_success 'rejects with re no space' '
23 echo "$test_name" > file &&
25 ! git commit -m "first re#3200"
28 test_expect_success 'accepts with re' '
29 echo "$test_name" > file &&
31 git commit -m "first re #3200"
34 test_expect_success 'accepts with re on the second line' '
35 echo "$test_name" > file &&
38 echo "line two re #3200" >> msg
42 test_expect_success 'accepts with RE' '
43 echo "$test_name" > file &&
45 git commit -m "first RE #3200"
48 test_expect_success 'accepts with refs' '
49 echo "$test_name" > file &&
51 git commit -m "first refs #3200"
54 test_expect_success 'accepts with qa' '
55 echo "$test_name" > file &&
57 git commit -m "first qa #3200"
60 test_expect_success 'accepts with no ticket' '
61 echo "$test_name" > file &&
63 git commit -m "first no ticket"