Merge branch 'nd/status-refresh-progress'
[gitweb.git] / t / t0090-cache-tree.sh
index 596e269394dccd42e85228c3121f979f5a4bd658..504334e552251ed0c1f74536f6fd09ffccda615d 100755 (executable)
@@ -156,7 +156,7 @@ test_expect_success PERL 'commit --interactive gives cache-tree on partial commi
                return 44;
        }
        EOT
-       (echo p; echo 1; echo; echo s; echo n; echo y; echo q) |
+       test_write_lines p 1 "" s n y q |
        git commit --interactive -m foo &&
        test_cache_tree
 '
@@ -257,17 +257,20 @@ test_expect_success 'no phantom error when switching trees' '
        >newdir/one &&
        git add newdir/one &&
        git checkout 2>errors &&
-       ! test -s errors
+       test_must_be_empty errors
 '
 
 test_expect_success 'switching trees does not invalidate shared index' '
-       git update-index --split-index &&
-       >split &&
-       git add split &&
-       test-tool dump-split-index .git/index | grep -v ^own >before &&
-       git commit -m "as-is" &&
-       test-tool dump-split-index .git/index | grep -v ^own >after &&
-       test_cmp before after
+       (
+               sane_unset GIT_TEST_SPLIT_INDEX &&
+               git update-index --split-index &&
+               >split &&
+               git add split &&
+               test-tool dump-split-index .git/index | grep -v ^own >before &&
+               git commit -m "as-is" &&
+               test-tool dump-split-index .git/index | grep -v ^own >after &&
+               test_cmp before after
+       )
 '
 
 test_done