--- a/tests/test_syntax.c Mon Dec 24 12:27:12 2007 -0600
+++ b/tests/test_syntax.c Mon Dec 24 12:34:22 2007 -0600
@@ -59,6 +59,28 @@
OUTPUT_TEST(tplate, "one {{ two }} three", "one 2 three");
+START_TEST(test_syntax_var_in_single_quotes) + GPlateTemplate *tplate = gplate_template_new(); + GPlateVariable *var = NULL; + var = gplate_string_variable_new("quoted", "in quotes"); + gplate_collection_add_variable(GPLATE_COLLECTION(tplate), var); + g_object_unref(G_OBJECT(var)); + OUTPUT_TEST(tplate, "abc '{{ quoted }}' xyz", "abc 'in quotes' xyz"); +START_TEST(test_syntax_var_in_double_quotes) + GPlateTemplate *tplate = gplate_template_new(); + GPlateVariable *var = NULL; + var = gplate_string_variable_new("quoted", "in quotes"); + gplate_collection_add_variable(GPLATE_COLLECTION(tplate), var); + g_object_unref(G_OBJECT(var)); + OUTPUT_TEST(tplate, "abc \"{{ quoted }}\" xyz", "abc \"in quotes\" xyz"); START_TEST(test_syntax_two_vars_one_block)
GPlateTemplate *tplate = gplate_template_new();
GPlateVariable *var = NULL;
@@ -100,6 +122,8 @@
tcase_add_test(tc, test_syntax_keywords_no_subst);
tcase_add_test(tc, test_syntax_keywords_no_subst_case);
tcase_add_test(tc, test_syntax_one_var);
+ tcase_add_test(tc, test_syntax_var_in_single_quotes); + tcase_add_test(tc, test_syntax_var_in_double_quotes); tcase_add_test(tc, test_syntax_two_vars_one_block);
tcase_add_test(tc, test_syntax_one_var_nested);