mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:16:32 +02:00
fix: command open
sets default flags when calling "from xxx" converters (#15383)
Fixes #13722 # Description Simple solution: `eval_block` -> `eval_call` with empty arguments # User-Facing Changes Should be none. # Tests + Formatting +1 # After Submitting
This commit is contained in:
@ -300,6 +300,20 @@ fn test_open_block_command() {
|
||||
assert_eq!(actual.out, "abcd")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_open_with_converter_flags() {
|
||||
// https://github.com/nushell/nushell/issues/13722
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
r#"
|
||||
def "from blockcommandparser" [ --flag ] { if $flag { "yes" } else { "no" } }
|
||||
open sample.blockcommandparser
|
||||
"#
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "no")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn open_ignore_ansi() {
|
||||
Playground::setup("open_test_ansi", |dirs, sandbox| {
|
||||
|
Reference in New Issue
Block a user