gplate/tags/tests/test-gplate-text-tag.c
author Gary Kramlich <grim@reaperworld.com>
Sun Jul 04 03:34:39 2010 -0500 (22 months ago)
changeset 400 0938cb5d076b
parent 395 gplate/tags/tests/gplate-text-tag-test.c@2a257237a0ef
permissions -rw-r--r--
the start of the test name standardization

refs #15
     1 /*
     2  * Copyright (C) 2007-2010 Gary Kramlich <grim@reaperworld.com>
     3  *
     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.
     8  *
     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.
    13  *
    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/>.
    16  */
    17 #include <gplate/gplate.h>
    18 
    19 #include <glib.h>
    20 
    21 #include "test-gplate-tag.h"
    22 
    23 /******************************************************************************
    24  * Tests
    25  *****************************************************************************/
    26 static void
    27 test_gplate_text_tag_syntax_plain(TestGPlateTagFixture *fixture,
    28                                   gconstpointer data)
    29 {
    30 	test_gplate_tag_output(fixture, data,
    31 	                       "simple template", "simple template");
    32 }
    33 
    34 static void
    35 test_gplate_text_tag_syntax_keywords(TestGPlateTagFixture *fixture,
    36                                      gconstpointer data)
    37 {
    38 	test_gplate_tag_output(fixture, data,
    39 	                       "extends if else endif for endfor",
    40 	                       "extends if else endif for endfor");
    41 }
    42 
    43 static void
    44 test_gplate_text_tag_syntax_keywords_case_sensitive(TestGPlateTagFixture *fixture,
    45                                                     gconstpointer data)
    46 {
    47 	test_gplate_tag_output(fixture, data,
    48 	                       "EXteNds iF eLse enDif fOr enDFor",
    49 	                       "EXteNds iF eLse enDif fOr enDFor");
    50 }
    51 
    52 /******************************************************************************
    53  * Main
    54  *****************************************************************************/
    55 gint
    56 main(gint argc, gchar **argv) {
    57 	g_test_init(&argc, &argv, NULL);
    58 
    59 	g_type_init();
    60 
    61 	gplate_config_load_default();
    62 
    63 	test_gplate_tag_add("/tags/text/plain",
    64 	                    test_gplate_text_tag_syntax_plain);
    65 	test_gplate_tag_add("/tags/text/keywords",
    66 	                    test_gplate_text_tag_syntax_keywords);
    67 	test_gplate_tag_add("/tags/text/keywords_case_sensitive", 
    68 	                    test_gplate_text_tag_syntax_keywords_case_sensitive);
    69 
    70 	return g_test_run();
    71 }
    72