2 * Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include <gplate/gplate.h>
21 #include "test-gplate-tag.h"
23 /******************************************************************************
25 *****************************************************************************/
27 test_gplate_comment_tag_empty(TestGPlateTagFixture *fixture,
30 test_gplate_tag_output(fixture, data, "{##}", "");
34 test_gplate_comment_tag_whitespace(TestGPlateTagFixture *fixture,
37 test_gplate_tag_output(fixture, data, "{# #}", "");
38 test_gplate_tag_output(fixture, data, "{#\t#}", "");
39 test_gplate_tag_output(fixture, data, "{#\n#}", "");
40 test_gplate_tag_output(fixture, data, "{#\r#}", "");
41 test_gplate_tag_output(fixture, data, "{#\r\n#}", "");
42 test_gplate_tag_output(fixture, data, "{#\n\r#}", "");
46 test_gplate_comment_tag_simple(TestGPlateTagFixture *fixture,
49 test_gplate_tag_output(fixture, data, "{# foo#}", "");
50 test_gplate_tag_output(fixture, data, "{#foo #}", "");
51 test_gplate_tag_output(fixture, data, "{#\tfoo#}", "");
52 test_gplate_tag_output(fixture, data, "{#foo\t#}", "");
53 test_gplate_tag_output(fixture, data, "{#\nfoo#}", "");
54 test_gplate_tag_output(fixture, data, "{#foo\n#}", "");
55 test_gplate_tag_output(fixture, data, "{#\rfoo#}", "");
56 test_gplate_tag_output(fixture, data, "{#foo\r#}", "");
57 test_gplate_tag_output(fixture, data, "{#\r\nfoo#}", "");
58 test_gplate_tag_output(fixture, data, "{#foo\r\n#}", "");
61 /******************************************************************************
63 *****************************************************************************/
65 main(gint argc, gchar **argv) {
66 g_test_init(&argc, &argv, NULL);
70 gplate_config_load_default();
72 test_gplate_tag_add("/tags/comment/empty",
73 test_gplate_comment_tag_empty);
74 test_gplate_tag_add("/tags/comment/whitespace",
75 test_gplate_comment_tag_whitespace);
76 test_gplate_tag_add("/tags/comment/simple",
77 test_gplate_comment_tag_simple);