Skip to content

Commit c74d885

Browse files
committed
test.cpp: added test for #217
1 parent 4c636dc commit c74d885

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,15 @@ static void pragma_backslash()
12101210
ASSERT_EQUALS("", preprocess(code, &outputList));
12111211
}
12121212

1213+
static void pragma_backslash_2() // #217
1214+
{
1215+
const char code[] = "#pragma comment(linker, \"foo \\\n"
1216+
"bar\")\n";
1217+
1218+
simplecpp::OutputList outputList;
1219+
ASSERT_EQUALS("", preprocess(code, &outputList));
1220+
}
1221+
12131222
static void dollar()
12141223
{
12151224
ASSERT_EQUALS("$ab", readfile("$ab"));
@@ -3758,6 +3767,7 @@ static void runTests(int argc, char **argv, Input input)
37583767
TEST_CASE(define_va_opt_9); // #632
37593768

37603769
TEST_CASE(pragma_backslash); // multiline pragma directive
3770+
TEST_CASE(pragma_backslash_2); // #217
37613771

37623772
// UB: #ifdef as macro parameter
37633773
TEST_CASE(define_ifdef);

0 commit comments

Comments
 (0)