We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 994d597 commit 9052674Copy full SHA for 9052674
tests/testsuite/file_jsonc.rs
@@ -98,15 +98,12 @@ fn test_error_parse() {
98
.build();
99
100
assert!(res.is_err());
101
- assert_eq!(
102
- res.unwrap_err().to_string(),
103
- format!(
104
- "Expected colon after the string or word in object property on line 4 column 1 in {}",
105
- std::path::Path::new(&f)
106
- .strip_prefix(std::env::current_dir().unwrap())
107
- .unwrap_or(std::path::Path::new(&f))
108
- .display()
109
- )
+ let err = res.unwrap_err().to_string();
+ let expected_prefix = "Expected colon after the string or word in object property on line 4 column 1 in ";
+ assert!(
+ err.starts_with(expected_prefix),
+ "Error message does not start with expected prefix. Got: {}",
+ err
110
);
111
}
112
0 commit comments