mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
add testcase for environment variables
This commit is contained in:
parent
608ec97b17
commit
88a68fb1ec
1 changed files with 6 additions and 0 deletions
6
core/src/external/shell.rs
vendored
6
core/src/external/shell.rs
vendored
|
|
@ -214,5 +214,11 @@ mod cmdparse {
|
||||||
let args = parse_cmd_to_args("echo -C%* xyz", &["111", "222"]);
|
let args = parse_cmd_to_args("echo -C%* xyz", &["111", "222"]);
|
||||||
assert_eq!(args, vec!["echo", "-C111 222", "xyz"]);
|
assert_eq!(args, vec!["echo", "-C111 222", "xyz"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_env_var() {
|
||||||
|
let args = parse_cmd_to_args(" %EDITOR% %* xyz", &["111", "222"]);
|
||||||
|
assert_eq!(args, vec!["%EDITOR%", "111", "222", "xyz"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue