diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-11-15 08:23:02 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-11-15 08:23:02 -0300 |
commit | 6dd30531ac62f6a3a564b7341d43f6cd71b90794 (patch) | |
tree | 576981a864592260da0165c585f66f9406f17d27 /src/parser.rs | |
parent | 72397506c3529f4878b5a1cf8205599764ac4088 (diff) |
Rework subtrees again and update docs
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs index a11b68c..eb378ad 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -877,5 +877,17 @@ mod tests { run_pattern(":map->[:str]:str"); run_pattern(":map(->[:str]:str)()"); } + + #[test] + fn test_documented_edge_cases() { + // tests that these patterns parse successfully + fn run_pattern(mut s: &str) { + let _ = prep_parser(s).pattern(&mut s).unwrap(); + } + // Empty pattern. + run_pattern(""); + // Empty subvalue + run_pattern("()"); + } } |