(command.CommandList children: [ (C {<cd>} { (braced_var_sub token: <Id.VSub_Number 0> suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<Id.Lit_Slash '/'> <'*'>}) ) } ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fails) op:assign_op.Equal rhs:{<0>} spids:[21])] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tests) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [(C {<ls>} {<'invalid/'> <Id.Lit_Star '*'>}) (C {<wc>} {<-l>})] negated: F ) ) } spids: [24] ) ] ) (C {<echo>} { (DQ <1..> (braced_var_sub token: <Id.VSub_Name tests> suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPound arg_word:{<'* '>}) ) ) } ) (command.ForEach iter_name: input iter_words: [{<'invalid/'> <Id.Lit_Star '*'>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:i) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) ) } spids: [64] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Simple words: [{<'../JSON.sh'>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_DollarName '$input'))} ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/tmp/JSON.sh_outlog'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/tmp/JSON.sh_errlog'>} ) ] do_fork: T ) ] ) action: [ (C {<echo>} { (DQ <'not ok '> ($ Id.VSub_DollarName '$i') <' - cat '> ($ Id.VSub_DollarName '$input') <' | ../JSON.sh should fail'> ) } ) (C {<echo>} {(DQ <'OUTPUT WAS >>>'>)}) (C {<cat>} {<'/tmp/JSON.sh_outlog'>}) (C {<echo>} {(DQ <'<<<'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fails) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike fails> right: {<Id.Lit_Digits 1>} ) ) } spids: [130] ) ] ) ] spids: [73 93] ) ] else_action: [ (C {<echo>} { (DQ <'ok '> ($ Id.VSub_DollarName '$i') <' - '> ($ Id.VSub_DollarName '$input') <' was rejected'> ) } ) (C {<echo>} {(DQ <'#'>)} { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<cat>} {<'/tmp/JSON.sh_errlog'>}) ) } ) ] ) ] ) ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$fails') <' test(s) failed'>)}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$fails')} ) ] )