(command.CommandList children: [ (C {<cd>} { (braced_var_sub token: <Id.VSub_Number 0> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>} ) ) } ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fails) op:assign_op.Equal rhs:{<0>} spids:[13])] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:i) op:assign_op.Equal rhs:{<0>} spids:[16])] ) (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>} {<'valid/'> <Id.Lit_Star '*'> <.json>}) (C {<wc>} {<-l>})] negated: F ) ) } spids: [19] ) ] ) (C {<echo>} { (DQ <1..> (braced_var_sub token: <Id.VSub_Name tests> suffix_op: (suffix_op.Unary tok:<Id.VOp1_DPound '##'> arg_word:{<Id.Lit_Other '*'> <' '>}) ) ) } ) (command.ForEach iter_name: input iter_words: [{<'valid/'> <Id.Lit_Star '*'> <.json>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expected) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name input> suffix_op: (suffix_op.Unary tok:<Id.VOp1_Percent '%'> arg_word:{<.json>}) ) <.parsed> ) } spids: [61] ) ] ) (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: [72] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [ (command.Simple words: [{<'../JSON.sh'>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_DollarName '$input'))} ) ] do_fork: T ) (C {<diff>} {<-u>} {<->} {(DQ ($ Id.VSub_DollarName '$expected'))}) ] negated: T ) ] ) action: [ (C {<echo>} { (DQ <'not ok '> ($ Id.VSub_DollarName '$i') <' - '> ($ Id.VSub_DollarName '$input') ) } ) (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: [120] ) ] ) ] spids: [81 107] ) ] else_action: [ (C {<echo>} {(DQ <'ok '> ($ Id.VSub_DollarName '$i') <' - '> ($ Id.VSub_DollarName '$input'))} ) ] ) ] ) ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$fails') <' test(s) failed'>)}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$fails')} ) ] )