(CommandList children: [ (C {(cd)} { (BracedVarSub token: <VSub_Number 0> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) spids: [6 11] ) } ) (SimpleCommand words: [{(.)} {(../JSON.sh)}] redirects: [(Redir op:<Redir_Less '<'> fd:16777215 arg_word:{(/dev/null)})] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:fails) op:Equal rhs:{(0)} spids:[28])] spids: [28] ) (FuncDef name: ttest body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [40 45] ) } spids: [39] ) ] spids: [39] ) (Sentence child: (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:input) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [50] ) ] spids: [48] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:expected) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_At '$@'))})] ) left_token: <Left_CommandSub '$('> spids: [63 73] ) ) } spids: [61] ) ] spids: [59] ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$expected'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/tmp/json_ttest_expected)} ) ] ) (If arms: [ (if_arm cond: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$input'))}) (C {(tokenize)}) (C {(diff)} {(-u)} {(-)} {(/tmp/json_ttest_expected)}) ] negated: F ) ] action: [(C {(echo)} {(DQ ('ok ') ($ VSub_Name '$i') (' - ') ($ VSub_Name '$input'))})] spids: [16777215 111] ) ] else_action: [ (C {(echo)} {(DQ ('not ok ') ($ VSub_Name '$i') (' - ') ($ VSub_Name '$input'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:fails) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:fails) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [140 145] ) } spids: [139] ) ] spids: [139] ) ] spids: [125 148] ) ] spids: [36] ) spids: [31 35] ) (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 <'}'>)} ) (If arms: [ (if_arm cond: [ (Pipeline children: [ (C {(cat)} {(../package.json)}) (SimpleCommand words: [{(tokenize)}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})] ) ] negated: T ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:fails) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:fails) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [450 455] ) } spids: [449] ) ] spids: [449] ) (C {(echo)} {(DQ ('Tokenizing package.json failed!'))}) ] spids: [16777215 446] ) ] spids: [16777215 464] ) (C {(echo)} {(DQ ($ VSub_Name '$fails') (' test(s) failed'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_Name '$fails')}) ] )