Skip to content

Commit

Permalink
use raw string in build
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Jun 21, 2020
1 parent 654726f commit 9d21266
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ fn generate_tests(out_dir: &OsStr) -> Result<(), Box<dyn error::Error>> {
}

string.push_str(&format!(
r#"
r####"
#[test]
fn {0}() {{
const _: &str = include_str!("{2}");
const _: &str = include_str!(r###"{2}"###);
let mut languages = Languages::new();
languages.get_statistics(&["{1}"], &[], &Config::default());
Expand Down Expand Up @@ -127,7 +127,7 @@ fn generate_tests(out_dir: &OsStr) -> Result<(), Box<dyn error::Error>> {
assert_eq!(language.comments, stats.comments);
assert_eq!(language.blanks, stats.blanks);
}}
"#,
"####,
name,
path.display(),
std::fs::canonicalize(root.join(path)).unwrap().display(),
Expand Down

0 comments on commit 9d21266

Please sign in to comment.