From 6fc9e54577a9546f73bb21ec33b9b7a7fd1f9944 Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Mon, 18 Nov 2024 08:53:55 +0530 Subject: [PATCH] Fix remaining failing tests --- tests/json.rs | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/tests/json.rs b/tests/json.rs index 6153a053..9cf5c4c7 100644 --- a/tests/json.rs +++ b/tests/json.rs @@ -25,6 +25,8 @@ fn alias() { let source = test .tempdir .path() + .canonicalize() + .unwrap() .join("justfile") .to_str() .unwrap() @@ -1267,8 +1269,22 @@ fn module() { }) .args(["--dump", "--dump-format", "json"]) .stdout_with_tempdir(|dir| { - let source = dir.path().join("justfile").to_str().unwrap().to_owned(); - let foo_just = dir.path().join("foo.just").to_str().unwrap().to_owned(); + let source = dir + .path() + .canonicalize() + .unwrap() + .join("justfile") + .to_str() + .unwrap() + .to_owned(); + let foo_just = dir + .path() + .canonicalize() + .unwrap() + .join("foo.just") + .to_str() + .unwrap() + .to_owned(); format!( "{}\n", serde_json::to_string(&json!({ @@ -1368,8 +1384,22 @@ fn module_group() { }) .args(["--dump", "--dump-format", "json"]) .stdout_with_tempdir(|dir| { - let source = dir.path().join("justfile").to_str().unwrap().to_owned(); - let foo_just = dir.path().join("foo.just").to_str().unwrap().to_owned(); + let source = dir + .path() + .canonicalize() + .unwrap() + .join("justfile") + .to_str() + .unwrap() + .to_owned(); + let foo_just = dir + .path() + .canonicalize() + .unwrap() + .join("foo.just") + .to_str() + .unwrap() + .to_owned(); format!( "{}\n", serde_json::to_string(&json!({