diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/blogc/check_content_parser.c | 8 | ||||
-rw-r--r-- | tests/blogc/check_source_parser.c | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/tests/blogc/check_content_parser.c b/tests/blogc/check_content_parser.c index 33e0c38..8797dc5 100644 --- a/tests/blogc/check_content_parser.c +++ b/tests/blogc/check_content_parser.c @@ -1162,7 +1162,7 @@ test_content_parse_ordered_list_crlf(void **state) static void -test_content_parse_title(void **state) +test_content_parse_first_header(void **state) { char *t = NULL; char *html = blogc_content_parse("# foo", NULL, &t, NULL); @@ -1240,7 +1240,7 @@ test_content_parse_title(void **state) static void -test_content_parse_title_crlf(void **state) +test_content_parse_first_header_crlf(void **state) { char *t = NULL; char *html = blogc_content_parse("# foo\r\n", NULL, &t, NULL); @@ -2355,8 +2355,8 @@ main(void) unit_test(test_content_parse_unordered_list_crlf), unit_test(test_content_parse_ordered_list), unit_test(test_content_parse_ordered_list_crlf), - unit_test(test_content_parse_title), - unit_test(test_content_parse_title_crlf), + unit_test(test_content_parse_first_header), + unit_test(test_content_parse_first_header_crlf), unit_test(test_content_parse_description), unit_test(test_content_parse_description_crlf), unit_test(test_content_parse_invalid_excerpt), diff --git a/tests/blogc/check_source_parser.c b/tests/blogc/check_source_parser.c index e6ff955..c992c45 100644 --- a/tests/blogc/check_source_parser.c +++ b/tests/blogc/check_source_parser.c @@ -43,7 +43,7 @@ test_source_parse(void **state) "# This is a test\n" "\n" "bola\n"); - assert_string_equal(bc_trie_lookup(source, "TITLE"), "This is a test"); + assert_string_equal(bc_trie_lookup(source, "FIRST_HEADER"), "This is a test"); assert_string_equal(bc_trie_lookup(source, "DESCRIPTION"), "bola"); bc_trie_free(source); } @@ -76,7 +76,7 @@ test_source_parse_crlf(void **state) "# This is a test\r\n" "\r\n" "bola\r\n"); - assert_string_equal(bc_trie_lookup(source, "TITLE"), "This is a test"); + assert_string_equal(bc_trie_lookup(source, "FIRST_HEADER"), "This is a test"); assert_string_equal(bc_trie_lookup(source, "DESCRIPTION"), "bola"); bc_trie_free(source); } @@ -111,7 +111,7 @@ test_source_parse_with_spaces(void **state) "# This is a test\n" "\n" "bola\n"); - assert_string_equal(bc_trie_lookup(source, "TITLE"), "This is a test"); + assert_string_equal(bc_trie_lookup(source, "FIRST_HEADER"), "This is a test"); assert_string_equal(bc_trie_lookup(source, "DESCRIPTION"), "bola"); bc_trie_free(source); } @@ -156,19 +156,19 @@ test_source_parse_with_excerpt(void **state) "\n" "guda\n" "yay"); - assert_string_equal(bc_trie_lookup(source, "TITLE"), "This is a test"); + assert_string_equal(bc_trie_lookup(source, "FIRST_HEADER"), "This is a test"); assert_string_equal(bc_trie_lookup(source, "DESCRIPTION"), "bola"); bc_trie_free(source); } static void -test_source_parse_with_title(void **state) +test_source_parse_with_first_header(void **state) { const char *a = "VAR1: asd asd\n" "VAR2: 123chunda\n" - "TITLE: THIS IS CHUNDA!\n" + "FIRST_HEADER: THIS IS CHUNDA!\n" "----------\n" "# This is a test\n" "\n" @@ -190,7 +190,7 @@ test_source_parse_with_title(void **state) "# This is a test\n" "\n" "bola\n"); - assert_string_equal(bc_trie_lookup(source, "TITLE"), "THIS IS CHUNDA!"); + assert_string_equal(bc_trie_lookup(source, "FIRST_HEADER"), "THIS IS CHUNDA!"); assert_string_equal(bc_trie_lookup(source, "DESCRIPTION"), "bola"); bc_trie_free(source); } @@ -224,7 +224,7 @@ test_source_parse_with_description(void **state) "# This is a test\n" "\n" "bola\n"); - assert_string_equal(bc_trie_lookup(source, "TITLE"), "This is a test"); + assert_string_equal(bc_trie_lookup(source, "FIRST_HEADER"), "This is a test"); assert_string_equal(bc_trie_lookup(source, "DESCRIPTION"), "huehuehuebrbr"); bc_trie_free(source); } @@ -556,7 +556,7 @@ main(void) unit_test(test_source_parse_crlf), unit_test(test_source_parse_with_spaces), unit_test(test_source_parse_with_excerpt), - unit_test(test_source_parse_with_title), + unit_test(test_source_parse_with_first_header), unit_test(test_source_parse_with_description), unit_test(test_source_parse_config_empty), unit_test(test_source_parse_config_invalid_key), |