Skip to content

Commit

Permalink
Add tests for raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
pczarn committed Nov 24, 2023
1 parent fb553d7 commit 1d5eaef
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[package]
name = "raw_string_huge"
type = "bin"
authors = [""]
[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
let _a = r##############################################################################################################################################################################################################################################################################"hello"##############################################################################################################################################################################################################################################################################;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "unit"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
global D = r#####"Hello "world""#####;

fn main() {
let a = "Hello \"world\"";
let b = r#"Hello "world""#;
let c = r##"Hello "world""##;
assert(a == b);
assert(b == c);
assert(c == D);
}

0 comments on commit 1d5eaef

Please sign in to comment.