]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0030-stripspace.sh
config: add core.commentString
[thirdparty/git.git] / t / t0030-stripspace.sh
index a161faf702945e323a3e242ac62b71633b0f1836..f10f42ff1e4a8716609a1e8dd86e1441e020db3d 100755 (executable)
@@ -401,14 +401,19 @@ test_expect_success 'strip comments with changed comment char' '
        test -z "$(echo "; comment" | git -c core.commentchar=";" stripspace -s)"
 '
 
+test_expect_success 'strip comments with changed comment string' '
+       test ! -z "$(echo "// comment" | git -c core.commentchar=// stripspace)" &&
+       test -z "$(echo "// comment" | git -c core.commentchar="//" stripspace -s)"
+'
+
 test_expect_success 'newline as commentchar is forbidden' '
        test_must_fail git -c core.commentChar="$LF" stripspace -s 2>err &&
-       grep "core.commentChar cannot contain newline" err
+       grep "core.commentchar cannot contain newline" err
 '
 
 test_expect_success 'empty commentchar is forbidden' '
        test_must_fail git -c core.commentchar= stripspace -s 2>err &&
-       grep "core.commentChar must have at least one character" err
+       grep "core.commentchar must have at least one character" err
 '
 
 test_expect_success '-c with single line' '