From eef4568e3fa5e5534126d9039ed58d7765bf6a19 Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Thu, 14 Jan 2021 10:57:09 +0100 Subject: [PATCH] Support windows separator --- packages/hurl/src/runner/body.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hurl/src/runner/body.rs b/packages/hurl/src/runner/body.rs index 01391febc..f5e631da9 100644 --- a/packages/hurl/src/runner/body.rs +++ b/packages/hurl/src/runner/body.rs @@ -132,13 +132,14 @@ mod tests { let variables = HashMap::new(); + let separator = if cfg!(windows) { "\\" } else { "/" }; let error = eval_bytes(bytes, &variables, "current_dir".to_string()) .err() .unwrap(); assert_eq!( error.inner, RunnerError::FileReadAccess { - value: String::from("current_dir/data.bin") + value: String::from(format!("current_dir{}data.bin", separator)) } ); assert_eq!(error.source_info, SourceInfo::init(1, 7, 1, 15));