diff options
author | jazzfool | 2023-03-30 16:21:40 +0000 |
---|---|---|
committer | GitHub | 2023-03-30 16:21:40 +0000 |
commit | d04288e0f3d292ce47fc0246bcbdc50a9d57ad5e (patch) | |
tree | ca103d419254e48e0043fc4acdd610643e126f16 /helix-term/tests/test/splits.rs | |
parent | 5b3dd6a678ba138ea21d7d5dd8d3c8a53c7a6d3b (diff) |
Canonicalize paths before stripping current dir as prefix (#6290)
Co-authored-by: jazzfool <shamoslover69@gmail.com>
Diffstat (limited to 'helix-term/tests/test/splits.rs')
-rw-r--r-- | helix-term/tests/test/splits.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/helix-term/tests/test/splits.rs b/helix-term/tests/test/splits.rs index 96ced21a..1d70f24a 100644 --- a/helix-term/tests/test/splits.rs +++ b/helix-term/tests/test/splits.rs @@ -1,5 +1,7 @@ use super::*; +use helix_core::path::get_normalized_path; + #[tokio::test(flavor = "multi_thread")] async fn test_split_write_quit_all() -> anyhow::Result<()> { let mut file1 = tempfile::NamedTempFile::new()?; @@ -25,21 +27,21 @@ async fn test_split_write_quit_all() -> anyhow::Result<()> { let doc1 = docs .iter() - .find(|doc| doc.path().unwrap() == file1.path()) + .find(|doc| doc.path().unwrap() == &get_normalized_path(file1.path())) .unwrap(); assert_eq!("hello1", doc1.text().to_string()); let doc2 = docs .iter() - .find(|doc| doc.path().unwrap() == file2.path()) + .find(|doc| doc.path().unwrap() == &get_normalized_path(file2.path())) .unwrap(); assert_eq!("hello2", doc2.text().to_string()); let doc3 = docs .iter() - .find(|doc| doc.path().unwrap() == file3.path()) + .find(|doc| doc.path().unwrap() == &get_normalized_path(file3.path())) .unwrap(); assert_eq!("hello3", doc3.text().to_string()); |