tests: use 'test_must_be_empty' instead of 'test ! -s'
[gitweb.git] / t / t7400-submodule-basic.sh
index 2f532529b82a847f81d4bdda17f9f07c115c2d86..48fd14fae6e9ac04f2edac3592bfb3ee4504cab1 100755 (executable)
@@ -126,8 +126,10 @@ test_expect_success 'submodule add' '
        test_cmp empty untracked
 '
 
-test_create_repo parent &&
-test_commit -C parent one
+test_expect_success 'setup parent and one repository' '
+       test_create_repo parent &&
+       test_commit -C parent one
+'
 
 test_expect_success 'redirected submodule add does not show progress' '
        git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
@@ -991,6 +993,11 @@ test_expect_success 'submodule deinit should remove the whole submodule section
        rmdir init
 '
 
+test_expect_success 'submodule deinit should unset core.worktree' '
+       test_path_is_file .git/modules/example/config &&
+       test_must_fail git config -f .git/modules/example/config core.worktree
+'
+
 test_expect_success 'submodule deinit from subdirectory' '
        git submodule update --init &&
        git config submodule.example.foo bar &&