aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/tests/test')
-rw-r--r--helix-term/tests/test/commands/write.rs11
-rw-r--r--helix-term/tests/test/splits.rs8
2 files changed, 10 insertions, 9 deletions
diff --git a/helix-term/tests/test/commands/write.rs b/helix-term/tests/test/commands/write.rs
index 376ba5e7..adc721c5 100644
--- a/helix-term/tests/test/commands/write.rs
+++ b/helix-term/tests/test/commands/write.rs
@@ -3,7 +3,8 @@ use std::{
ops::RangeInclusive,
};
-use helix_core::{diagnostic::Severity, path::get_normalized_path};
+use helix_core::diagnostic::Severity;
+use helix_stdx::path;
use helix_view::doc;
use super::*;
@@ -23,7 +24,7 @@ async fn test_write_quit_fail() -> anyhow::Result<()> {
assert_eq!(1, docs.len());
let doc = docs.pop().unwrap();
- assert_eq!(Some(&get_normalized_path(file.path())), doc.path());
+ assert_eq!(Some(&path::normalize(file.path())), doc.path());
assert_eq!(&Severity::Error, app.editor.get_status().unwrap().1);
}),
false,
@@ -269,7 +270,7 @@ async fn test_write_scratch_to_new_path() -> anyhow::Result<()> {
assert_eq!(1, docs.len());
let doc = docs.pop().unwrap();
- assert_eq!(Some(&get_normalized_path(file.path())), doc.path());
+ assert_eq!(Some(&path::normalize(file.path())), doc.path());
}),
false,
)
@@ -341,7 +342,7 @@ async fn test_write_new_path() -> anyhow::Result<()> {
Some(&|app| {
let doc = doc!(app.editor);
assert!(!app.editor.is_err());
- assert_eq!(&get_normalized_path(file1.path()), doc.path().unwrap());
+ assert_eq!(&path::normalize(file1.path()), doc.path().unwrap());
}),
),
(
@@ -349,7 +350,7 @@ async fn test_write_new_path() -> anyhow::Result<()> {
Some(&|app| {
let doc = doc!(app.editor);
assert!(!app.editor.is_err());
- assert_eq!(&get_normalized_path(file2.path()), doc.path().unwrap());
+ assert_eq!(&path::normalize(file2.path()), doc.path().unwrap());
assert!(app.editor.document_by_path(file1.path()).is_none());
}),
),
diff --git a/helix-term/tests/test/splits.rs b/helix-term/tests/test/splits.rs
index f010c86b..3b66c048 100644
--- a/helix-term/tests/test/splits.rs
+++ b/helix-term/tests/test/splits.rs
@@ -1,6 +1,6 @@
use super::*;
-use helix_core::path::get_normalized_path;
+use helix_stdx::path;
#[tokio::test(flavor = "multi_thread")]
async fn test_split_write_quit_all() -> anyhow::Result<()> {
@@ -27,21 +27,21 @@ async fn test_split_write_quit_all() -> anyhow::Result<()> {
let doc1 = docs
.iter()
- .find(|doc| doc.path().unwrap() == &get_normalized_path(file1.path()))
+ .find(|doc| doc.path().unwrap() == &path::normalize(file1.path()))
.unwrap();
assert_eq!("hello1", doc1.text().to_string());
let doc2 = docs
.iter()
- .find(|doc| doc.path().unwrap() == &get_normalized_path(file2.path()))
+ .find(|doc| doc.path().unwrap() == &path::normalize(file2.path()))
.unwrap();
assert_eq!("hello2", doc2.text().to_string());
let doc3 = docs
.iter()
- .find(|doc| doc.path().unwrap() == &get_normalized_path(file3.path()))
+ .find(|doc| doc.path().unwrap() == &path::normalize(file3.path()))
.unwrap();
assert_eq!("hello3", doc3.text().to_string());