Merge branch 'sg/fast-import-dump-refs-on-checkpoint-fix'
[gitweb.git] / t / t3904-stash-patch.sh
index 83744f8c930637560d7d97123a2ffbd38030637e..9546b6f8a4e2fdf0c25f3b463de45a0feae4695c 100755 (executable)
@@ -29,14 +29,14 @@ test_expect_success 'setup' '
 test_expect_success 'saying "n" does nothing' '
        set_state HEAD HEADfile_work HEADfile_index &&
        set_state dir/foo work index &&
-       (echo n; echo n; echo n) | test_must_fail git stash save -p &&
+       test_write_lines n n n | test_must_fail git stash save -p &&
        verify_state HEAD HEADfile_work HEADfile_index &&
        verify_saved_state bar &&
        verify_state dir/foo work index
 '
 
 test_expect_success 'git stash -p' '
-       (echo y; echo n; echo y) | git stash save -p &&
+       test_write_lines y n y | git stash save -p &&
        verify_state HEAD committed HEADfile_index &&
        verify_saved_state bar &&
        verify_state dir/foo head index &&
@@ -51,7 +51,7 @@ test_expect_success 'git stash -p --no-keep-index' '
        set_state HEAD HEADfile_work HEADfile_index &&
        set_state bar bar_work bar_index &&
        set_state dir/foo work index &&
-       (echo y; echo n; echo y) | git stash save -p --no-keep-index &&
+       test_write_lines y n y | git stash save -p --no-keep-index &&
        verify_state HEAD committed committed &&
        verify_state bar bar_work dummy &&
        verify_state dir/foo head head &&
@@ -66,7 +66,7 @@ test_expect_success 'git stash --no-keep-index -p' '
        set_state HEAD HEADfile_work HEADfile_index &&
        set_state bar bar_work bar_index &&
        set_state dir/foo work index &&
-       (echo y; echo n; echo y) | git stash save --no-keep-index -p &&
+       test_write_lines y n y | git stash save --no-keep-index -p &&
        verify_state HEAD committed committed &&
        verify_state dir/foo head head &&
        verify_state bar bar_work dummy &&