mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Fix wrong parsing of signatures in predecl scan (#10637)
This commit is contained in:
@ -102,6 +102,23 @@ fn parse_file_relative_to_parsed_file_simple() {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn predecl_signature_parse() {
|
||||
Playground::setup("predecl_signature_parse", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"spam.nu",
|
||||
"
|
||||
def main [] { foo }
|
||||
|
||||
def foo []: nothing -> nothing { print 'foo' }
|
||||
",
|
||||
)]);
|
||||
|
||||
let actual = nu!(cwd: dirs.test(), pipeline("nu spam.nu"));
|
||||
|
||||
assert_eq!(actual.out, "foo");
|
||||
})
|
||||
}
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn parse_file_relative_to_parsed_file() {
|
||||
|
Reference in New Issue
Block a user