Allow exporting extern-wrapped (#10025)

This commit is contained in:
Jakub Žádník
2023-08-18 20:45:33 +03:00
committed by GitHub
parent fe2c498a81
commit cdf09abcc0
6 changed files with 115 additions and 17 deletions

View File

@ -121,7 +121,7 @@ fn command_not_found_error_suggests_typo_fix() {
}
#[test]
fn command_not_found_error_shows_not_found() {
fn command_not_found_error_shows_not_found_1() {
let actual = nu!(r#"
export extern "foo" [];
foo
@ -129,6 +129,15 @@ fn command_not_found_error_shows_not_found() {
assert!(actual.err.contains("'foo' was not found"));
}
#[test]
fn command_not_found_error_shows_not_found_2() {
let actual = nu!(r#"
export extern-wrapped my-foo [...rest] { foo };
my-foo
"#);
assert!(actual.err.contains("did you mean"));
}
#[test]
fn command_substitution_wont_output_extra_newline() {
let actual = nu!(r#"