Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/tests/test/commands/write.rs')
-rw-r--r--helix-term/tests/test/commands/write.rs20
1 files changed, 16 insertions, 4 deletions
diff --git a/helix-term/tests/test/commands/write.rs b/helix-term/tests/test/commands/write.rs
index d1419b08..5b4dd148 100644
--- a/helix-term/tests/test/commands/write.rs
+++ b/helix-term/tests/test/commands/write.rs
@@ -118,7 +118,10 @@ async fn test_write_quit_fail() -> anyhow::Result<()> {
assert_eq!(1, docs.len());
let doc = docs.pop().unwrap();
- assert_eq!(Some(&path::normalize(file.path())), doc.path());
+ assert_eq!(
+ Some(path::normalize(file.path())),
+ doc.path().map(ToOwned::to_owned)
+ );
assert_eq!(&Severity::Error, app.editor.get_status().unwrap().1);
}),
false,
@@ -359,7 +362,10 @@ async fn test_write_scratch_to_new_path() -> anyhow::Result<()> {
assert_eq!(1, docs.len());
let doc = docs.pop().unwrap();
- assert_eq!(Some(&path::normalize(file.path())), doc.path());
+ assert_eq!(
+ Some(path::normalize(file.path())),
+ doc.path().map(ToOwned::to_owned)
+ );
}),
false,
)
@@ -385,7 +391,10 @@ async fn test_write_scratch_to_new_path_force_creates_file() -> anyhow::Result<(
assert_eq!(1, docs.len());
let doc = docs.pop().unwrap();
- assert_eq!(Some(&path::normalize(&new_path)), doc.path());
+ assert_eq!(
+ Some(path::normalize(&new_path)),
+ doc.path().map(ToOwned::to_owned)
+ );
}),
false,
)
@@ -772,7 +781,10 @@ async fn test_symlink_write_fail() -> anyhow::Result<()> {
assert_eq!(1, docs.len());
let doc = docs.pop().unwrap();
- assert_eq!(Some(&path::normalize(&symlink_path)), doc.path());
+ assert_eq!(
+ Some(path::normalize(&symlink_path)),
+ doc.path().map(ToOwned::to_owned)
+ );
assert_eq!(&Severity::Error, app.editor.get_status().unwrap().1);
}),
false,