X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c059183d126dfbf7aa376b189803684f3e915a52..b96cc2bb14029099f59cfa9d77318f8c5f54db57:/test/format/test-unquote diff --git a/test/format/test-unquote b/test/format/test-unquote index 0eb239b1..ea465b6d 100755 --- a/test/format/test-unquote +++ b/test/format/test-unquote @@ -16,9 +16,21 @@ setup_test # Test various unquoting scenarios # -name='"Mr. Foo Bar"' +run_test 'eval fmttest -raw -format "%(unquote{text})" "Mr. Foo Bar"' \ + 'Mr. Foo Bar' -run_test "fmttest -raw -format %(unquote{text}) $name" \ +run_test 'eval fmttest -raw -format "%(unquote{text})" "Mr. \"Foo\" Bar"' \ 'Mr. Foo Bar' +# +# Note here: the string we wanted passed on the command line is: +# +# "Mr. \"Foo\" Bar" +# +# The extra \ are necessary to get it past the shell +# + +run_test 'eval fmttest -raw -format "%(unquote{text})" "Mr. \\\"Foo\\\" Bar"' \ + 'Mr. "Foo" Bar' + exit ${failed:-0}