t4201: make use of abbreviation in the test more robust
[gitweb.git] / t / t5615-alternate-env.sh
index eec4137ca5b392743e29068f4fffae1ffb78d812..d2d883f3a1d473a2b69fab05adbb21e67e5e600c 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