]> diplodocus.org Git - nmh/blobdiff - test/format/test-unquote
Don't need to `else' after done() at end of then-block.
[nmh] / test / format / test-unquote
index 0eb239b113e86119269165a997b9f76204ceb502..ea465b6d5f20c6429185b245dd007adbfec16686 100755 (executable)
@@ -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}