mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
.. [no ci]
This commit is contained in:
parent
0d4bb60922
commit
e182edbf96
1 changed files with 1 additions and 17 deletions
|
|
@ -158,10 +158,9 @@ pub fn optional_bool(s: &str) -> Option<bool> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::{borrow::Cow, env, path::Path};
|
||||
use std::{borrow::Cow, path::Path};
|
||||
|
||||
use super::path_relative_to;
|
||||
use crate::expand_path;
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
|
|
@ -190,19 +189,4 @@ mod tests {
|
|||
assert("C:\\a", "C:\\a\\b\\c", "..\\..\\");
|
||||
assert("C:\\a\\a\\b", "C:\\a\\b\\b", "..\\..\\a\\b");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_expand_path() {
|
||||
let path_s = r#"a"b"#;
|
||||
assert_eq!(expand_path(path_s), env::current_dir().unwrap().join(std::path::Path::new(path_s)));
|
||||
|
||||
let path_s = r#"a'b"#;
|
||||
assert_eq!(expand_path(path_s), env::current_dir().unwrap().join(std::path::Path::new(path_s)));
|
||||
|
||||
let path_s = r#"a; x b"#;
|
||||
assert_eq!(expand_path(path_s), env::current_dir().unwrap().join(std::path::Path::new(path_s)));
|
||||
|
||||
let path_s = r#"a && x b"#;
|
||||
assert_eq!(expand_path(path_s), env::current_dir().unwrap().join(std::path::Path::new(path_s)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue