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' '
35 echo "$test_name" > file &&
37 git commit -m "first RE #3200"
40 test_expect_success 'accepts with refs' '
41 echo "$test_name" > file &&
43 git commit -m "first refs #3200"
46 test_expect_success 'accepts with qa' '
47 echo "$test_name" > file &&
49 git commit -m "first qa #3200"
52 test_expect_success 'accepts with no ticket' '
53 echo "$test_name" > file &&
55 git commit -m "first no ticket"