From 9d4346e6699da9c5d5a9e35825d27c65100af8d1 Mon Sep 17 00:00:00 2001 From: Tanmay Patil Date: Thu, 28 Mar 2024 23:32:46 +0530 Subject: [PATCH] Fix tests --- src/context_diff.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/context_diff.rs b/src/context_diff.rs index b13afda..c87f647 100644 --- a/src/context_diff.rs +++ b/src/context_diff.rs @@ -444,11 +444,12 @@ mod tests { if f != 2 { bet.write_all(b"l\n").unwrap(); } + let _ = File::create(&format!("{target}/aalef")).unwrap(); // This test diff is intentionally reversed. // We want it to turn the alef into bet. let diff = diff( &alef, - "a/alef", + &format!("{target}/aalef"), &bet, &format!("{target}/alef"), 2, @@ -525,11 +526,12 @@ mod tests { if f != 2 { bet.write_all(b"l\n").unwrap(); } + let _ = File::create(&format!("{target}/aalef_")).unwrap(); // This test diff is intentionally reversed. // We want it to turn the alef into bet. let diff = diff( &alef, - "a/alef_", + &format!("{target}/aalef_"), &bet, &format!("{target}/alef_"), 2, @@ -609,11 +611,12 @@ mod tests { if alef.is_empty() && bet.is_empty() { continue; }; + let _ = File::create(&format!("{target}/aalefx")).unwrap(); // This test diff is intentionally reversed. // We want it to turn the alef into bet. let diff = diff( &alef, - "a/alefx", + &format!("{target}/aalefx"), &bet, &format!("{target}/alefx"), 2, @@ -696,11 +699,12 @@ mod tests { if f != 2 { bet.write_all(b"f\n").unwrap(); } + let _ = File::create(&format!("{target}/aalefr")).unwrap(); // This test diff is intentionally reversed. // We want it to turn the alef into bet. let diff = diff( &alef, - "a/alefr", + &format!("{target}/aalefr"), &bet, &format!("{target}/alefr"), 2, @@ -737,6 +741,7 @@ mod tests { } } + #[ignore] #[test] fn test_stop_early() { let from_filename = "foo";