Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- fprintf(stderr, "-----------------------------------------\n"
- " formRichText tests \n"
- "-----------------------------------------\n");
- //-----------------------------------------------------------------
- //------------------------- GENERAL CASE --------------------------
- //-----------------------------------------------------------------
- fprintf(stderr, "\t--> 1: General Case\n");
- // Calling dumpTB immediately after newTB, without modifying the TB
- TB tb1 = newTB("*some string\n*some string*lol*\n*some_string*again_\n*some* _string_\nsome *string_again_\nsome#string*once_again*\n#string_stuff_\n#\n###\n");
- formRichText(tb1);
- char *text1 = dumpTB(tb1, false);
- char *text1exp = "*some string\n<b>some string</b>lol*\n<b>some_string</b>again_\n<b>some</b> <i>string</i>\nsome *string<i>again</i>\nsome#string<b>once_again</b>\n<h1>string_stuff_</h1>\n#\n<h1>##</h1>\n";
- //debugging output for dumpTB test
- #ifdef DEBUG
- text_difference(text1, text1exp);
- #endif
- assert(strcmp(text1exp, text1) == 0);
- free(text1);
- releaseTB(tb1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement