mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Initial support for parse-time constants (#7436)
This commit is contained in:
@ -11,6 +11,17 @@ fn source_file_relative_to_file() {
|
||||
assert_eq!(actual.out, "5");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_const_file() {
|
||||
let actual = nu!(cwd: "tests/parsing/samples",
|
||||
r#"
|
||||
const file = 'single_line.nu'
|
||||
source $file
|
||||
"#);
|
||||
|
||||
assert_eq!(actual.out, "5");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run_nu_script_single_line() {
|
||||
let actual = nu!(cwd: "tests/parsing/samples", r#"
|
||||
|
Reference in New Issue
Block a user