Skip to content

Commit a03d864

Browse files
committed
test.cpp: added test for #217
1 parent 9ef5900 commit a03d864

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
@@ -1182,6 +1182,15 @@ static void pragma_backslash()
11821182
ASSERT_EQUALS("", preprocess(code, &outputList));
11831183
}
11841184

1185+
static void pragma_backslash_2() // #217
1186+
{
1187+
const char code[] = "#pragma comment(linker, \"foo \\\n"
1188+
"bar\")\n";
1189+
1190+
simplecpp::OutputList outputList;
1191+
ASSERT_EQUALS("", preprocess(code, &outputList));
1192+
}
1193+
11851194
static void dollar()
11861195
{
11871196
ASSERT_EQUALS("$ab", readfile("$ab"));
@@ -3728,6 +3737,7 @@ int main(int argc, char **argv)
37283737
TEST_CASE(define_va_opt_9); // #632
37293738

37303739
TEST_CASE(pragma_backslash); // multiline pragma directive
3740+
TEST_CASE(pragma_backslash_2); // #217
37313741

37323742
// UB: #ifdef as macro parameter
37333743
TEST_CASE(define_ifdef);

0 commit comments

Comments
 (0)