Code

t7501.8: feed a meaningful command
[git.git] / t / t7501-commit.sh
index 8297cb4f1e6e2d903dfbf6fde825d2c787082e58..3d2b14d3035e02e14696f64edd0ddabca204f576 100755 (executable)
@@ -14,8 +14,11 @@ test_tick
 test_expect_success \
        "initial status" \
        "echo 'bongo bongo' >file &&
-        git add file && \
-        git status | grep 'Initial commit'"
+        git add file"
+
+test_expect_success C_LOCALE_OUTPUT \
+       "Constructing initial commit" \
+       "git status | grep 'Initial commit'"
 
 test_expect_success \
        "fail initial amend" \
@@ -38,10 +41,12 @@ test_expect_success \
        "echo King of the bongo >file &&
        test_must_fail git commit -m foo -a file"
 
-test_expect_success PERL \
-       "using paths with --interactive" \
-       "echo bong-o-bong >file &&
-       ! (echo 7 | git commit -m foo --interactive file)"
+test_expect_success PERL 'cannot use paths with --interactive' '
+       echo bong-o-bong >file &&
+       # 2: update, 1:st path, that is all, 7: quit
+       ( echo 2; echo 1; echo; echo 7 ) |
+       test_must_fail git commit -m foo --interactive file
+'
 
 test_expect_success \
        "using invalid commit with -C" \
@@ -230,6 +235,10 @@ test_expect_success 'amend commit to fix date' '
 
 '
 
+test_expect_success 'commit complains about bogus date' '
+       test_must_fail git commit --amend --date=10.11.2010
+'
+
 test_expect_success 'sign off (1)' '
 
        echo 1 >positive &&