]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3704-add-pathspec-file.sh
t: fix quotes tests for --pathspec-from-file
[thirdparty/git.git] / t / t3704-add-pathspec-file.sh
index 3cfdb669b7a5a1bc4b915abb0c880f067bfbd7b9..61b6e51009a26e827c2c84aac379d2d337a810bd 100755 (executable)
@@ -97,7 +97,11 @@ test_expect_success 'CRLF delimiters' '
 test_expect_success 'quotes' '
        restore_checkpoint &&
 
-       printf "\"file\\101.t\"" | git add --pathspec-from-file=- &&
+       cat >list <<-\EOF &&
+       "file\101.t"
+       EOF
+
+       git add --pathspec-from-file=list &&
 
        cat >expect <<-\EOF &&
        A  fileA.t
@@ -108,7 +112,10 @@ test_expect_success 'quotes' '
 test_expect_success 'quotes not compatible with --pathspec-file-nul' '
        restore_checkpoint &&
 
-       printf "\"file\\101.t\"" >list &&
+       cat >list <<-\EOF &&
+       "file\101.t"
+       EOF
+
        test_must_fail git add --pathspec-from-file=list --pathspec-file-nul
 '