Skip to content

Commit

Permalink
adds a couple more test cases for parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
chanced committed Jun 21, 2024
1 parent e513e2f commit 043ee75
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,20 @@ mod tests {
source: InvalidEncodingError { offset: 1 },
}),
),
(
"/~2",
Err(ParseError::InvalidEncoding {
offset: 0,
source: InvalidEncodingError { offset: 1 },
}),
),
(
"/~a",
Err(ParseError::InvalidEncoding {
offset: 0,
source: InvalidEncodingError { offset: 1 },
}),
),
];
for (input, expected) in tests {
let actual = Pointer::parse(input).map(Pointer::as_str);
Expand Down

0 comments on commit 043ee75

Please sign in to comment.