(command.CommandList children: [ (C {(cd)} { (braced_var_sub token: (Token id:Id.VSub_Number val:0 span_id:7) suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{(Id.Lit_Slash /) ('*')}) ) } ) (command.Simple words: [{(.)} {(../JSON.sh)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:21) fd: -1 arg_word: {(/dev/null)} ) ] ) (command.ShFunction name: ptest body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(tokenize)}) (command.Simple words: [{(parse)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:39) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) ] ) ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fails) op:assign_op.Equal rhs:{(0)} spids:[45])] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:i) op:assign_op.Equal rhs:{(0)} spids:[48])] ) (C {(echo)} {(DQ (1..4))}) (command.ForEach iter_name: input iter_words: [ {(SQ (Token id:Id.Lit_Chars val:'"oooo" ' span_id:64))} {(SQ (Token id:Id.Lit_Chars val:'[true, 1, [0, {}]] ' span_id:68))} {(SQ (Token id:Id.Lit_Chars val:'{"true": 1}' span_id:72))} ] 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: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:i span_id:80) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } spids: [78] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [(C {(echo)} {(DQ ($ Id.VSub_DollarName '$input'))}) (C {(ptest)})] negated: F ) ] action: [ (C {(echo)} { (DQ ('ok ') ($ Id.VSub_DollarName '$i') (' - ') ($ Id.VSub_DollarName '$input')) } ) ] spids: [87 101] ) ] else_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: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:fails span_id:129) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } spids: [127] ) ] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (command.Simple words: [{(ptest)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:147) fd: -1 arg_word: {(../package.json)} ) ] ) ] negated: T ) ] action: [ (C {(echo)} {(DQ ('not ok 4 - Parsing package.json failed!'))}) (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: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:fails span_id:163) ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } spids: [161] ) ] ) ] spids: [141 151] ) ] else_action: [(C {(echo)} {(DQ ('ok ') ($ Id.VSub_DollarName '$i') (' - package.json'))})] ) (C {(echo)} {(DQ ($ Id.VSub_DollarName '$fails') (' test(s) failed'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:191) arg_word: {($ Id.VSub_DollarName '$fails')} ) ] )