Add test for raw string

This commit is contained in:
Esteban Küber 2018-07-23 15:43:34 -07:00
parent c55a698943
commit bde2be0b1c
2 changed files with 14 additions and 1 deletions

View file

@ -64,4 +64,11 @@ fn main() {
format!("foo }"); //~ ERROR: unmatched `}` found
format!("foo %s baz", "bar"); //~ ERROR: argument never used
format!(r##"
{foo}
"##);
//~^^^ ERROR: there is no argument named `foo`
}

View file

@ -183,5 +183,11 @@ LL | format!("foo %s baz", "bar"); //~ ERROR: argument never used
= help: `%s` should be written as `{}`
= note: printf formatting not supported; see the documentation for `std::fmt`
error: aborting due to 26 previous errors
error: there is no argument named `foo`
--> $DIR/ifmt-bad-arg.rs:70:9
|
LL | {foo}
| ^^^^^
error: aborting due to 27 previous errors