aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check_source_parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-12 02:31:02 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-12 02:31:02 -0300
commit701ffe18c2f256245b4d016daafca208839a8f63 (patch)
tree6da1c4a4e5161bfa574e0c0149bb0e78346ba02d /tests/check_source_parser.c
parent9aec1f36e80af5c06cb690bda125c628e26e5601 (diff)
downloadblogc-701ffe18c2f256245b4d016daafca208839a8f63.tar.gz
blogc-701ffe18c2f256245b4d016daafca208839a8f63.tar.bz2
blogc-701ffe18c2f256245b4d016daafca208839a8f63.zip
content-parser: added id attributes to headers
the id is a slugified version of the (unparsed) header content.
Diffstat (limited to 'tests/check_source_parser.c')
-rw-r--r--tests/check_source_parser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/check_source_parser.c b/tests/check_source_parser.c
index 94f75c9..145ba30 100644
--- a/tests/check_source_parser.c
+++ b/tests/check_source_parser.c
@@ -38,10 +38,10 @@ test_source_parse(void **state)
assert_string_equal(b_trie_lookup(source, "VAR1"), "asd asd");
assert_string_equal(b_trie_lookup(source, "VAR2"), "123chunda");
assert_string_equal(b_trie_lookup(source, "EXCERPT"),
- "<h1>This is a test</h1>\n"
+ "<h1 id=\"this-is-a-test\">This is a test</h1>\n"
"<p>bola</p>\n");
assert_string_equal(b_trie_lookup(source, "CONTENT"),
- "<h1>This is a test</h1>\n"
+ "<h1 id=\"this-is-a-test\">This is a test</h1>\n"
"<p>bola</p>\n");
assert_string_equal(b_trie_lookup(source, "RAW_CONTENT"),
"# This is a test\n"
@@ -71,10 +71,10 @@ test_source_parse_with_spaces(void **state)
assert_string_equal(b_trie_lookup(source, "VAR1"), "chunda");
assert_string_equal(b_trie_lookup(source, "BOLA"), "guda");
assert_string_equal(b_trie_lookup(source, "EXCERPT"),
- "<h1>This is a test</h1>\n"
+ "<h1 id=\"this-is-a-test\">This is a test</h1>\n"
"<p>bola</p>\n");
assert_string_equal(b_trie_lookup(source, "CONTENT"),
- "<h1>This is a test</h1>\n"
+ "<h1 id=\"this-is-a-test\">This is a test</h1>\n"
"<p>bola</p>\n");
assert_string_equal(b_trie_lookup(source, "RAW_CONTENT"),
"# This is a test\n"
@@ -107,10 +107,10 @@ test_source_parse_with_excerpt(void **state)
assert_string_equal(b_trie_lookup(source, "VAR1"), "asd asd");
assert_string_equal(b_trie_lookup(source, "VAR2"), "123chunda");
assert_string_equal(b_trie_lookup(source, "EXCERPT"),
- "<h1>This is a test</h1>\n"
+ "<h1 id=\"this-is-a-test\">This is a test</h1>\n"
"<p>bola</p>\n");
assert_string_equal(b_trie_lookup(source, "CONTENT"),
- "<h1>This is a test</h1>\n"
+ "<h1 id=\"this-is-a-test\">This is a test</h1>\n"
"<p>bola</p>\n"
"<p>guda\n"
"yay</p>\n");