mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 21:25:31 +00:00
Add test
This commit is contained in:
parent
bc16c9fd8d
commit
29c98d4a2f
2 changed files with 22 additions and 0 deletions
15
parser/src/snapshots/rustpython_parser__string__tests__parse_fstring_escaped_brackets.snap
generated
Normal file
15
parser/src/snapshots/rustpython_parser__string__tests__parse_fstring_escaped_brackets.snap
generated
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
"\\{x\\}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
]
|
|
@ -960,6 +960,13 @@ mod tests {
|
|||
insta::assert_debug_snapshot!(parse_ast);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_fstring_escaped_brackets() {
|
||||
let source = "\\{{x\\}}";
|
||||
let parse_ast = parse_fstring(source).unwrap();
|
||||
insta::assert_debug_snapshot!(parse_ast);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_string_concat() {
|
||||
let source = "'Hello ' 'world'";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue