]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Add additional CM tests
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 21 Nov 2017 22:29:39 +0000 (17:29 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Tue, 21 Nov 2017 22:29:39 +0000 (17:29 -0500)
Sources/libMultiMarkdown/critic_markup.c

index 1972161dc94ac23f461472060aad212a4482dc3a..604fef8348307a9e03a52cee6ece6316bc2cd630 100644 (file)
@@ -391,6 +391,20 @@ void Test_critic(CuTest* tc) {
        mmd_critic_markup_reject(test);
        CuAssertStrEquals(tc, "foo bar", test->str);
 
+       d_string_erase(test, 0, -1);
+       d_string_append(test, "{==foo bar==}");
+       mmd_critic_markup_accept(test);
+       CuAssertStrEquals(tc, "foo bar", test->str);
+
+       d_string_erase(test, 0, -1);
+       d_string_append(test, "{>>foo bar<<}");
+       mmd_critic_markup_reject(test);
+       CuAssertStrEquals(tc, "", test->str);
+
+       d_string_erase(test, 0, -1);
+       d_string_append(test, "{>>foo bar<<}");
+       mmd_critic_markup_accept(test);
+       CuAssertStrEquals(tc, "", test->str);
 
        // Decrement counter and clean up token pool
        token_pool_drain();