aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test/splits.rs
diff options
context:
space:
mode:
authorMichael Davis2024-01-16 18:59:48 +0000
committerBlaž Hrastnik2024-01-18 01:57:53 +0000
commit1f916e65cff4459698d465b2f4558da1e1bf6e44 (patch)
tree5b6768e3069085bc5ba995efa95fdc73241ed0f6 /helix-term/tests/test/splits.rs
parentaf8e524a7d06253fa854bf8954f64312e11d0ea0 (diff)
Create helix-stdx crate for stdlib extensions
helix-stdx is meant to carry extensions to the stdlib or low-level dependencies that are useful in all other crates. This commit starts with all of the path functions from helix-core and the CWD tracking that lived in helix-loader. The CWD tracking in helix-loader was previously unable to call the canonicalization functions in helix-core. Switching to our custom canonicalization code should make no noticeable difference though since `std::env::current_dir` returns a canonicalized path with symlinks resolved (at least on unix).
Diffstat (limited to 'helix-term/tests/test/splits.rs')
-rw-r--r--helix-term/tests/test/splits.rs8
1 files changed, 4 insertions, 4 deletions
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());