t5615: fix a here-doc syntax error
[gitweb.git] / t / t5615-alternate-env.sh
index 22d9d8178b23db2cdf2f7066059af43d44eae6e9..63ef0b79952d9551e8c38496d19850eb02d7caab 100755 (executable)
@@ -68,4 +68,23 @@ test_expect_success 'access alternate via relative path (subdir)' '
        EOF
 '
 
+# set variables outside test to avoid quote insanity; the \057 is '/',
+# which doesn't need quoting, but just confirms that de-quoting
+# is working.
+quoted='"one.git\057objects"'
+unquoted='two.git/objects'
+test_expect_success 'mix of quoted and unquoted alternates' '
+       check_obj "$quoted:$unquoted" <<-EOF
+       $one blob
+       $two blob
+       EOF
+'
+
+test_expect_success !MINGW 'broken quoting falls back to interpreting raw' '
+       mv one.git \"one.git &&
+       check_obj \"one.git/objects <<-EOF
+       $one blob
+       EOF
+'
+
 test_done