-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: Add testcases for multiline strings
Regression checks for #1399 gcc/testsuite/ChangeLog: * rust/compile/multiline-string.rs: New test. * rust/execute/torture/multiline-string.rs: New test.
- Loading branch information
1 parent
d28cae5
commit e39da44
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
fn main() { | ||
let _a = "gcc | ||
rs"; | ||
|
||
let _b = "rust | ||
c | ||
gcc | ||
rs"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// { dg-output "gcc\n\nrs\n" } | ||
|
||
extern "C" { | ||
fn printf(fmt: *const i8, ...); | ||
} | ||
|
||
fn main() -> i32 { | ||
let a = "gcc | ||
rs\0"; | ||
|
||
unsafe { printf("%s\n\0" as *const str as *const i8, a as *const str as *const i8); } | ||
|
||
0 | ||
} |