diff --git a/src/ast.rs b/src/ast.rs index 5260ee5eb..04654f908 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -1644,16 +1644,16 @@ pub struct NotStatement { parent: Option<*const dyn Node>, /// Keyword, either not or exclam. pub kw: KeywordNot, - pub variables: VariableAssignmentList, pub time: Option, + pub variables: VariableAssignmentList, pub contents: Statement, } implement_node!(NotStatement, branch, not_statement); implement_acceptor_for_branch!( NotStatement, (kw: (KeywordNot)), - (variables: (VariableAssignmentList)), (time: (Option)), + (variables: (VariableAssignmentList)), (contents: (Statement)), ); impl ConcreteNode for NotStatement { diff --git a/tests/checks/time.fish b/tests/checks/time.fish index f4fe070e1..587ab98fe 100644 --- a/tests/checks/time.fish +++ b/tests/checks/time.fish @@ -38,6 +38,22 @@ not time true #CHECKERR: {{.*}} #CHECKERR: {{.*}} +not time a=b true +#CHECKERR: ___{{.*}} +#CHECKERR: {{.*}} +#CHECKERR: {{.*}} +#CHECKERR: {{.*}} + +# Currently illegal syntax. Same in zsh. POSIX shells call the external command "time" here. +a=b time true +#CHECKERR: fish: time: missing man page +#CHECKERR: Documentation may not be installed. +#CHECKERR: `help time` will show an online version +not a=b time true +#CHECKERR: fish: time: missing man page +#CHECKERR: Documentation may not be installed. +#CHECKERR: `help time` will show an online version + $fish -c 'time true&' #CHECKERR: fish: {{.*}} #CHECKERR: time true&