mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 06:35:56 +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:
@ -7,6 +7,7 @@ mod parse;
|
||||
mod split;
|
||||
mod type_;
|
||||
|
||||
use nu_test_support::{nu, pipeline};
|
||||
use std::path::MAIN_SEPARATOR;
|
||||
|
||||
/// Helper function that joins string literals with '/' or '\', based on host OS
|
||||
@ -32,3 +33,9 @@ fn joins_path_on_other_than_windows() {
|
||||
|
||||
assert_eq!(&actual, "sausage/bacon/spam");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn const_path_relative_to() {
|
||||
let actual = nu!("'/home/viking' | path relative-to '/home'");
|
||||
assert_eq!(actual.out, "viking");
|
||||
}
|
||||
|
Reference in New Issue
Block a user