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:
@ -25,3 +25,13 @@ fn splits_correctly_single_path() {
|
||||
|
||||
assert_eq!(actual.out, "spam.txt");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn splits_correctly_single_path_const() {
|
||||
let actual = nu!(r#"
|
||||
const result = ('home/viking/spam.txt' | path split);
|
||||
$result | last
|
||||
"#);
|
||||
|
||||
assert_eq!(actual.out, "spam.txt");
|
||||
}
|
||||
|
Reference in New Issue
Block a user