Skip to content

Commit f5362a2

Browse files
committed
macos test fix.
1 parent 3d30df4 commit f5362a2

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

core/src/utils.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,24 @@ mod tests {
548548

549549
for (identifier, in_document, expected) in test_cases {
550550
let result = normalize_identifier(identifier, &in_document, &config_with_externals.get_specification_folder(),&config_with_externals.get_external_folders());
551-
assert_eq!(result.unwrap(), temp_path.join(expected).to_string_lossy(), "Failed for identifier: {}", identifier);
551+
552+
// Doing canon because of macos tmp path symlinks, question is if code should work if we are adjusting tests??
553+
let expected_path = temp_path.join(expected);
554+
let expected_path_canon = expected_path.canonicalize().unwrap();
555+
let expected_canon = expected_path_canon.to_string_lossy();
556+
557+
let result_str = result.unwrap(); // assuming it's a String
558+
let result_path = std::fs::canonicalize(&result_str).unwrap();
559+
let result_canon = result_path.to_string_lossy();
560+
561+
assert_eq!(
562+
&result_canon,
563+
&expected_canon,
564+
"Failed for identifier: {}",
565+
identifier
566+
);
567+
568+
552569
}
553570

554571

0 commit comments

Comments
 (0)