i18n: standardise messages
[gitweb.git] / t / t1011-read-tree-sparse-checkout.sh
index 5c0053a20bf2fbf1dd466ace5dc933e38ce3544d..3583105698d334ada7c7983c81ea7df74eaa3bde 100755 (executable)
@@ -247,7 +247,31 @@ error: The following untracked working tree files would be overwritten by checko
 Please move or remove them before you can switch branches.
 Aborting
 EOF
-       test_cmp expected actual
+       test_i18ncmp expected actual
+'
+
+test_expect_success 'checkout without --ignore-skip-worktree-bits' '
+       echo "*" >.git/info/sparse-checkout &&
+       git checkout -f top &&
+       test_path_is_file init.t &&
+       echo sub >.git/info/sparse-checkout &&
+       git checkout &&
+       echo modified >> sub/added &&
+       git checkout . &&
+       test_path_is_missing init.t &&
+       git diff --exit-code HEAD
+'
+
+test_expect_success 'checkout with --ignore-skip-worktree-bits' '
+       echo "*" >.git/info/sparse-checkout &&
+       git checkout -f top &&
+       test_path_is_file init.t &&
+       echo sub >.git/info/sparse-checkout &&
+       git checkout &&
+       echo modified >> sub/added &&
+       git checkout --ignore-skip-worktree-bits . &&
+       test_path_is_file init.t &&
+       git diff --exit-code HEAD
 '
 
 test_done