grep: recurse in-process using 'struct repository'
[gitweb.git] / t / t7063-status-untracked-cache.sh
index 4e1e290a9f4fd14ed40ac6f29987cd2af34537cd..e5fb892f9575fda4baf0b2a0e6b31cf13a0d6c0b 100755 (executable)
@@ -658,7 +658,29 @@ test_expect_success 'test ident field is working' '
        cp -R done dthree dtwo four three ../other_worktree &&
        GIT_WORK_TREE=../other_worktree git status 2>../err &&
        echo "warning: Untracked cache is disabled on this system or location." >../expect &&
-       test_cmp ../expect ../err
+       test_i18ncmp ../expect ../err
+'
+
+test_expect_success 'untracked cache survives a checkout' '
+       git commit --allow-empty -m empty &&
+       test-dump-untracked-cache >../before &&
+       test_when_finished  "git checkout master" &&
+       git checkout -b other_branch &&
+       test-dump-untracked-cache >../after &&
+       test_cmp ../before ../after &&
+       test_commit test &&
+       test-dump-untracked-cache >../before &&
+       git checkout master &&
+       test-dump-untracked-cache >../after &&
+       test_cmp ../before ../after
+'
+
+test_expect_success 'untracked cache survives a commit' '
+       test-dump-untracked-cache >../before &&
+       git add done/two &&
+       git commit -m commit &&
+       test-dump-untracked-cache >../after &&
+       test_cmp ../before ../after
 '
 
 test_done