Go to the source code of this file.
Value:MACRO_BEGIN \
EXPECT_TRUE(expect == out); \
LOG_INFO(expect); \
LOG_INFO(out); \
MACRO_END
ERASEABLE string markdown(string s)
handle string spacing as markdown:
Referenced by TEST().
◆ markdown()
handle string spacing as markdown:
- two spaces escape a linebreak (otherwise text wraps)
- two linebreaks become a paragraph (remain unchanged)
Definition at line 9 of file markdown.qh.
References chr2str, FOREACH_CHAR, and strcat().
17 for (; spaces > 0; --spaces) {
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define FOREACH_CHAR(s, cond, body)
◆ TEST()
TEST |
( |
Markdown |
, |
|
|
LineWrap |
|
|
) |
| |
Definition at line 45 of file markdown.qh.
References SUCCEED, and X.
47 #define X(expect, in) MACRO_BEGIN \ 48 string out = markdown(in); \ 49 EXPECT_TRUE(expect == out); \ 55 X(
"lorem ipsum",
"lorem ipsum");
57 X(
"lorem ipsum",
"lorem ipsum ");
59 X(
"lorem ipsum",
"lorem\nipsum");
61 X(
"lorem\nipsum",
"lorem \nipsum");
63 X(
"lorem\n\nipsum",
"lorem\n\nipsum");
#define SUCCEED()
Must be present at the end of a test.