Skip to content

Commit

Permalink
Update tests for new proc-macro2 escape behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 24, 2019
1 parent 837b511 commit b3a3d76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test.rs
Expand Up @@ -166,23 +166,23 @@ fn test_char() {
let tokens = quote! {
#zero #pound #quote #apost #newline #heart
};
let expected = "'\\u{0}' '#' '\\\"' '\\'' '\\n' '\\u{2764}'";
let expected = "'\\u{0}' '#' '\"' '\\'' '\\n' '\\u{2764}'";
assert_eq!(expected, tokens.to_string());
}

#[test]
fn test_str() {
let s = "\0 a 'b \" c";
let tokens = quote!(#s);
let expected = "\"\\u{0} a \\'b \\\" c\"";
let expected = "\"\\u{0} a 'b \\\" c\"";
assert_eq!(expected, tokens.to_string());
}

#[test]
fn test_string() {
let s = "\0 a 'b \" c".to_string();
let tokens = quote!(#s);
let expected = "\"\\u{0} a \\'b \\\" c\"";
let expected = "\"\\u{0} a 'b \\\" c\"";
assert_eq!(expected, tokens.to_string());
}

Expand Down

0 comments on commit b3a3d76

Please sign in to comment.