Fixed signature
This commit is contained in:
parent
4509944988
commit
01ad1ca5f9
|
@ -23,11 +23,7 @@ impl Command for Do {
|
|||
|
||||
fn signature(&self) -> Signature {
|
||||
Signature::build("do")
|
||||
.required(
|
||||
"closure",
|
||||
SyntaxShape::OneOf(vec![SyntaxShape::Closure(None), SyntaxShape::Any]),
|
||||
"The closure to run.",
|
||||
)
|
||||
.required("closure", SyntaxShape::Closure(None), "The closure to run.")
|
||||
.input_output_types(vec![(Type::Any, Type::Any)])
|
||||
.switch(
|
||||
"ignore-errors",
|
||||
|
|
|
@ -38,8 +38,8 @@ def assert_error [] {
|
|||
assert error $failing_code
|
||||
|
||||
let good_code = {|| }
|
||||
let assert_error_raised = (try { do assert $good_code; false } catch { true })
|
||||
assert $assert_error_raised "The assert error should raise an error if there is no error in the executed code."
|
||||
let assert_error_raised = (try { assert error $good_code; false } catch { true })
|
||||
assert $assert_error_raised "The assert error should be false if there is no error in the executed code."
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in New Issue
Block a user