summaryrefslogtreecommitdiffstats
path: root/tests/file_hjson.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/file_hjson.rs')
-rw-r--r--tests/file_hjson.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/file_hjson.rs b/tests/file_hjson.rs
index 086489b..1e99b87 100644
--- a/tests/file_hjson.rs
+++ b/tests/file_hjson.rs
@@ -10,6 +10,7 @@ extern crate serde_derive;
use config::*;
use float_cmp::ApproxEqUlps;
use std::collections::HashMap;
+use std::path::PathBuf;
#[derive(Debug, Deserialize)]
struct Place {
@@ -69,9 +70,11 @@ fn test_error_parse() {
let mut c = Config::default();
let res = c.merge(File::new("tests/Settings-invalid", FileFormat::Hjson));
+ let path : PathBuf = ["tests", "Settings-invalid.hjson"].iter().collect();
+
assert!(res.is_err());
assert_eq!(
res.unwrap_err().to_string(),
- "Found a punctuator where a key name was expected (check your syntax or use quotes if the key name includes {}[],: or whitespace) at line 4 column 1 in tests/Settings-invalid.hjson".to_string()
+ format!("Found a punctuator where a key name was expected (check your syntax or use quotes if the key name includes {{}}[],: or whitespace) at line 4 column 1 in {}", path.to_str().unwrap())
);
}