Test the re being on the second line.
[git-central.git] / tests / t1000-commit-msg-ticket-hook.sh
index 8ec92d0..ffad6f3 100644 (file)
@@ -1,10 +1,9 @@
 #!/bin/sh
 
-test_description='commit-msg ticket hook'
+test_description='client commit-msg ticket enforcer'
 
 . ./test-lib.sh
 
-
 # setup the commit-msg hook
 install_client_hook 'commit-msg' 'commit-msg'
 
@@ -32,6 +31,14 @@ test_expect_success 'accepts with re' '
        git commit -m "first re #3200"
 '
 
+test_expect_success 'accepts with re on the second line' '
+       echo "$test_name" > file &&
+       git add file &&
+       echo "line one" > msg
+       echo "line two re #3200" >> msg
+       git commit -F msg
+'
+
 test_expect_success 'accepts with RE' '
        echo "$test_name" > file &&
        git add file &&
@@ -50,5 +57,11 @@ test_expect_success 'accepts with qa' '
        git commit -m "first qa #3200"
 '
 
+test_expect_success 'accepts with no ticket' '
+       echo "$test_name" > file &&
+       git add file &&
+       git commit -m "first no ticket"
+'
+
 test_done