forked from Rust-GCC/gccrs
-
Notifications
You must be signed in to change notification settings - Fork 0
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 Rust-GCC#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 2a64b20
Showing
2 changed files
with
27 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,13 @@ | ||
// { dg-output "gcc\n\nrs" } | ||
|
||
extern "C" { | ||
fn printf(fmt: *const i8, ...); | ||
} | ||
|
||
fn main() { | ||
let a = "gcc | ||
rs\0"; | ||
|
||
unsafe { printf("%s\n\0" as *const str as *const i8, a as *const str as *const i8); } | ||
} |