mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:05:47 +02:00
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:
@ -81,3 +81,9 @@ fn replaces_basename_of_path_ending_with_double_dot() {
|
||||
let expected = join_path_sep(&["some/file.txt/..", "eggs"]);
|
||||
assert_eq!(actual.out, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn const_path_basename() {
|
||||
let actual = nu!("const name = ('spam/eggs.txt' | path basename); $name");
|
||||
assert_eq!(actual.out, "eggs.txt");
|
||||
}
|
||||
|
Reference in New Issue
Block a user