forked from extern/nushell
Allow parse-time evaluation of calls, pipelines and subexpressions (#9499)
Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com>
This commit is contained in:
@ -135,3 +135,9 @@ fn replaces_dirname_of_way_too_many_levels() {
|
||||
let expected = join_path_sep(&["eggs", "some/dir/with/spam.txt"]);
|
||||
assert_eq!(actual.out, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn const_path_dirname() {
|
||||
let actual = nu!("const name = ('spam/eggs.txt' | path dirname); $name");
|
||||
assert_eq!(actual.out, "spam");
|
||||
}
|
||||
|
Reference in New Issue
Block a user