aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-11-03 15:34:31 +0100
committerTeddy Wing2018-11-03 15:34:31 +0100
commitb6d0d0ec238ecd7a5dd77fc87dea602e102d3fde (patch)
tree17c3d55b2b0beb1075344046305874c2870030e7
parent28c0062cd1712e1c29c7b20db08b02821cff200f (diff)
downloaddome-key-map-b6d0d0ec238ecd7a5dd77fc87dea602e102d3fde.tar.bz2
map_group_shows_error_in_middle_of_line: Remove errors vec
Since the errors are going to be different from what's written in the test expectation, just remove them to correct the test. We kind of only care about the position. Maybe the first error would be interesting to match on, but let's just get rid of the part we know is wrong.
-rw-r--r--src/parser.rs20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 7dc5bcf..fa763ed 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1549,22 +1549,12 @@ map <not-a-button> <Nop>
";
let result = map_group().easy_parse(State::new(text)).map(|t| t.0);
- assert_eq!(result, Err(easy::Errors {
- position: SourcePosition {
+ assert_eq!(
+ result.unwrap_err().position,
+ SourcePosition {
line: 2,
column: 5,
- },
- errors: vec![
- easy::Error::Unexpected('n'.into()),
- easy::Error::Expected("map".into()),
- easy::Error::Expected("cmd".into()),
- easy::Error::Expected("mode".into()),
- easy::Error::Expected("lf newline".into()),
- easy::Error::Expected("whitespace".into()),
- easy::Error::Expected("tab".into()),
- easy::Error::Expected('#'.into()),
- easy::Error::Expected("end of input".into()),
- ],
- }));
+ }
+ );
}
}