(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.Simple words: [{<.>} {<'../JSON.sh'>}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})] do_fork: T ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:i) op:assign_op.Equal rhs:{<0>} spids:[25])] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fails) op:assign_op.Equal rhs:{<0>} spids:[28])] ) (command.ShFunction name: ttest body: (BraceGroup 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: [39] ) ] ) (command.Sentence child: (C {<local>} {<Id.Lit_VarLike 'input='> (DQ ($ Id.VSub_Number '$1'))}) terminator: <Id.Op_Semi _> ) (C {<shift>}) (C {<local>} {<Id.Lit_VarLike 'expected='> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {(SQ <'%s\\n'>)} {(DQ ($ Id.VSub_At '$@'))}) ) ) } ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$expected'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/tmp/json_ttest_expected'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$input'))}) (C {<tokenize>}) (C {<diff>} {<-u>} {<->} {<'/tmp/json_ttest_expected'>}) ] negated: F ) ] ) action: [ (C {<echo>} { (DQ <'ok '> ($ Id.VSub_DollarName '$i') <' - '> ($ Id.VSub_DollarName '$input')) } ) ] spids: [88 111] ) ] 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: <Id.Lit_ArithVarLike fails> right: {<Id.Lit_Digits 1>} ) ) } spids: [139] ) ] ) ] ) ] ) ) (C {<ttest>} {(SQ <'"dah"'>)} {(SQ <'"dah"'>)}) (C {<ttest>} {(SQ <'""'>)} {(SQ <'""'>)}) (C {<ttest>} {(SQ <'["dah"]'>)} {(SQ <'['>)} {(SQ <'"dah"'>)} {(SQ <']'>)}) (C {<ttest>} {(SQ <'" "'>)} {(SQ <'" "'>)}) (C {<ttest>} {(SQ <'" \\" "'>)} {(SQ <'" \\" "'>)}) (C {<ttest>} {(SQ <'["dah"]'>)} {(SQ <'['>)} {(SQ <'"dah"'>)} {(SQ <']'>)}) (C {<ttest>} {(SQ <123>)} {(SQ <123>)}) (C {<ttest>} {(SQ <123.142>)} {(SQ <123.142>)}) (C {<ttest>} {(SQ <-123>)} {(SQ <-123>)}) (C {<ttest>} {(SQ <1e23>)} {(SQ <1e23>)}) (C {<ttest>} {(SQ <0.1>)} {(SQ <0.1>)}) (C {<ttest>} {(SQ <-110>)} {(SQ <-110>)}) (C {<ttest>} {(SQ <-110.10>)} {(SQ <-110.10>)}) (C {<ttest>} {(SQ <-110e10>)} {(SQ <-110e10>)}) (C {<ttest>} {(SQ <null>)} {(SQ <null>)}) (C {<ttest>} {(SQ <true>)} {(SQ <true>)}) (C {<ttest>} {(SQ <false>)} {(SQ <false>)}) (C {<ttest>} {(SQ <'[ null , -110e10, "null" ]'>)} {(SQ <'['>)} {(SQ <null>)} {(SQ <','>)} {(SQ <-110e10>)} {(SQ <','>)} {(SQ <'"null"'>)} {(SQ <']'>)} ) (C {<ttest>} {(SQ <'{"e": false}'>)} {(SQ <'{'>)} {(SQ <'"e"'>)} {(SQ <':'>)} {(SQ <false>)} {(SQ <'}'>)}) (C {<ttest>} {(SQ <'{"e": "string"}'>)} {(SQ <'{'>)} {(SQ <'"e"'>)} {(SQ <':'>)} {(SQ <'"string"'>)} {(SQ <'}'>)} ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [ (C {<cat>} {<'../package.json'>}) (command.Simple words: [{<tokenize>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: T ) ] ) action: [ (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: [449] ) ] ) (C {<echo>} {(DQ <'Tokenizing package.json failed!'>)}) ] spids: [431 446] ) ] ) (C {<echo>} {(DQ ($ Id.VSub_DollarName '$fails') <' test(s) failed'>)}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$fails')} ) ] )