t7800: improve test descriptions with empty arguments
[alt-git.git] / t / t7414-submodule-mistakes.sh
blob24f30e3bf9c6440eca92838b42ae330a856f3fb6
1 #!/bin/sh
3 test_description='handling of common mistakes people may make with submodules'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success 'create embedded repository' '
9 git init embed &&
10 test_commit -C embed one
13 test_expect_success 'git-add on embedded repository warns' '
14 test_when_finished "git rm --cached -f embed" &&
15 git add embed 2>stderr &&
16 test_grep warning stderr
19 test_expect_success '--no-warn-embedded-repo suppresses warning' '
20 test_when_finished "git rm --cached -f embed" &&
21 git add --no-warn-embedded-repo embed 2>stderr &&
22 test_grep ! warning stderr
25 test_expect_success 'no warning when updating entry' '
26 test_when_finished "git rm --cached -f embed" &&
27 git add embed &&
28 git -C embed commit --allow-empty -m two &&
29 git add embed 2>stderr &&
30 test_grep ! warning stderr
33 test_expect_success 'submodule add does not warn' '
34 test_when_finished "git rm -rf submodule .gitmodules" &&
35 git -c protocol.file.allow=always \
36 submodule add ./embed submodule 2>stderr &&
37 test_grep ! warning stderr
40 test_done