Create a sublibrary for the tag testing. I'll probably do this for all components going forward.
Pretty much just reimplemented the tests that were created for check with gtester and ctest
1 #include <gplate/gplate.h>
5 #include "gplate-tag-test.h"
7 /******************************************************************************
9 *****************************************************************************/
11 gplate_text_tag_test_syntax_plain(GPlateTagTestFixture *fixture,
14 fixture->template_string = "simple template";
15 fixture->expected = "simple template";
17 gplate_tag_test_output(fixture, data);
21 gplate_text_tag_test_syntax_keywords(GPlateTagTestFixture *fixture,
24 fixture->template_string = "extends if else endif for endfor";
25 fixture->expected = "extends if else endif for endfor";
27 gplate_tag_test_output(fixture, data);
31 gplate_text_tag_test_syntax_keywords_case_sensitive(GPlateTagTestFixture *fixture,
34 fixture->template_string = "EXteNds iF eLse enDif fOr enDFor";
35 fixture->expected = "EXteNds iF eLse enDif fOr enDFor";
37 gplate_tag_test_output(fixture, data);
40 /******************************************************************************
42 *****************************************************************************/
44 main(gint argc, gchar **argv) {
45 g_test_init(&argc, &argv, NULL);
49 gplate_config_load_default();
51 gplate_tag_test_add("/tags/text/plain",
52 gplate_text_tag_test_syntax_plain);
53 gplate_tag_test_add("/tags/text/keywords",
54 gplate_text_tag_test_syntax_keywords);
55 gplate_tag_test_add("/tags/text/keywords_case_sensitive",
56 gplate_text_tag_test_syntax_keywords_case_sensitive);