Skip to content

Commit be622e4

Browse files
committed
Test Display for ApathParseError #mutants
1 parent bb58dcd commit be622e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/apath.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ impl DebugCheckOrder {
291291

292292
#[cfg(test)]
293293
mod test {
294+
use std::str::FromStr;
295+
294296
use super::Apath;
295297

296298
#[test]
@@ -376,6 +378,8 @@ mod test {
376378
];
377379
for v in invalid_cases.iter() {
378380
assert!(!Apath::is_valid(v), "{v:?} incorrectly marked valid");
381+
let err = Apath::from_str(v).unwrap_err();
382+
assert_eq!(format!("{}", err), "Invalid apath: must have an initial slash and no ..");
379383
}
380384
}
381385

0 commit comments

Comments
 (0)