1.1 --- a/gplate/tags/tests/gplate-variable-tag-test.c Fri Jul 02 03:13:36 2010 -0500
1.2 +++ b/gplate/tags/tests/gplate-variable-tag-test.c Sat Jul 03 16:53:48 2010 -0500
1.3 @@ -97,6 +97,40 @@
1.4 NULL);
1.5 }
1.6
1.7 +static void
1.8 +gplate_variable_tag_test_single_quotes(GPlateTagTestFixture *fixture,
1.9 + gconstpointer data)
1.10 +{
1.11 + gplate_variable_tag_test(fixture, data,
1.12 + "foo '{{ bar }}' baz", "foo 'bar' baz",
1.13 + "bar", "bar",
1.14 + NULL);
1.15 +}
1.16 +
1.17 +static void
1.18 +gplate_variable_tag_test_double_quotes(GPlateTagTestFixture *fixture,
1.19 + gconstpointer data)
1.20 +{
1.21 + gplate_variable_tag_test(fixture, data,
1.22 + "foo \"{{ bar }}\" baz", "foo \"bar\" baz",
1.23 + "bar", "bar",
1.24 + NULL);
1.25 +}
1.26 +
1.27 +static void
1.28 +gplate_variable_tag_test_mixed_quotes(GPlateTagTestFixture *fixture,
1.29 + gconstpointer data)
1.30 +{
1.31 + gplate_variable_tag_test(fixture, data,
1.32 + "foo \"{{ bar }}' baz", "foo \"bar' baz",
1.33 + "bar", "bar",
1.34 + NULL);
1.35 +
1.36 + gplate_variable_tag_test(fixture, data,
1.37 + "foo '{{ bar }}\" baz", "foo 'bar\" baz",
1.38 + "bar", "bar",
1.39 + NULL);
1.40 +}
1.41 /******************************************************************************
1.42 * Main
1.43 *****************************************************************************/
1.44 @@ -126,6 +160,15 @@
1.45 gplate_tag_test_add("/tags/variable/newline_wrapped",
1.46 gplate_variable_tag_test_newline_wrapped);
1.47
1.48 + gplate_tag_test_add("/tags/variable/quotes/single",
1.49 + gplate_variable_tag_test_single_quotes);
1.50 +
1.51 + gplate_tag_test_add("/tags/variable/quotes/double",
1.52 + gplate_variable_tag_test_double_quotes);
1.53 +
1.54 + gplate_tag_test_add("/tags/variable/quotes/mixed",
1.55 + gplate_variable_tag_test_mixed_quotes);
1.56 +
1.57 return g_test_run();
1.58 }
1.59