(command.CommandList
  children: [
    (C {<set>} {<-o>} {<nounset>})
    (C {<set>} {<-o>} {<pipefail>})
    (C {<set>} {<-o>} {<errexit>})
    (C {<source>} {<'test/common.sh'>})
    (command.ShFunction
      name: time-tool
      body: 
        (BraceGroup
          children: [
            (C 
              {
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: (C {<dirname>} {($ Id.VSub_Number '$0')})
                ) <'/time.py'>
              } {(DQ ($ Id.VSub_At '$@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: test-tsv
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'out='> <'_tmp/time.tsv'>})
            (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$out')})
            (command.ForEach
              iter_name: i
              iter_words: [{<1>} {<2>} {<3>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<time-tool>} {<--tsv>} {<-o>} {($ Id.VSub_DollarName '$out')} {<-->} {<sleep>} 
                      {<0.0> (${ Id.VSub_Name i)}
                    )
                  ]
                )
            )
            (C {<cat>} {($ Id.VSub_DollarName '$out')})
          ]
        )
    )
    (command.ShFunction
      name: test-cannot-serialize
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'out='> <'_tmp/time2.tsv'>})
            (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$out')})
            (C {<set>} {<Id.Lit_Other '+'> <o>} {<errexit>})
            (command.Sentence
              child: 
                (C {<time-tool>} {<--tsv>} {<-o>} {($ Id.VSub_DollarName '$out')} {<--field>} 
                  {
                    (single_quoted
                      left: <Id.Left_DollarSingleQuote '$\''>
                      tokens: [<Id.Char_OneChar '\\n'>]
                      multiline: F
                    )
                  } {<-->} {<sleep>} {<0.001>}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:status)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [178]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {($ Id.VSub_DollarName '$status')} {<Id.Lit_Equals '='>} {<1>})
                (C {<fail>} {(DQ <'Unexpected status '> ($ Id.VSub_DollarName '$status'))})
              ]
            )
            (command.Sentence
              child: 
                (C {<time-tool>} {<--tsv>} {<-o>} {($ Id.VSub_DollarName '$out')} {<--field>} 
                  {
                    (single_quoted
                      left: <Id.Left_DollarSingleQuote '$\''>
                      tokens: [<Id.Char_OneChar '\\t'>]
                      multiline: F
                    )
                  } {<-->} {<sleep>} {<0.001>}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:status)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [226]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {($ Id.VSub_DollarName '$status')} {<Id.Lit_Equals '='>} {<1>})
                (C {<fail>} {(DQ <'Unexpected status '> ($ Id.VSub_DollarName '$status'))})
              ]
            )
            (command.Sentence
              child: 
                (C {<time-tool>} {<--tsv>} {<-o>} {($ Id.VSub_DollarName '$out')} {<--field>} {(SQ <'"'>)} 
                  {<-->} {<sleep>} {<0.001>}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:status)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [274]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {($ Id.VSub_DollarName '$status')} {<Id.Lit_Equals '='>} {<1>})
                (C {<fail>} {(DQ <'Unexpected status '> ($ Id.VSub_DollarName '$status'))})
              ]
            )
            (command.Sentence
              child: 
                (C {<time-tool>} {<--tsv>} {<-o>} {($ Id.VSub_DollarName '$out')} {<--field>} {(SQ <'\\'>)} 
                  {<-->} {<sleep>} {<0.001>}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:status)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [322]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {($ Id.VSub_DollarName '$status')} {<Id.Lit_Equals '='>} {<0>})
                (C {<fail>} {(DQ <'Unexpected status '> ($ Id.VSub_DollarName '$status'))})
              ]
            )
            (command.Sentence
              child: 
                (C {<time-tool>} {<--tsv>} {<-o>} {($ Id.VSub_DollarName '$out')} {<--field>} {(SQ <' '>)} 
                  {<-->} {<sleep>} {<0.001>}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:status)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [370]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {($ Id.VSub_DollarName '$status')} {<Id.Lit_Equals '='>} {<0>})
                (C {<fail>} {(DQ <'Unexpected status '> ($ Id.VSub_DollarName '$status'))})
              ]
            )
            (C {<set>} {<-o>} {<errexit>})
            (C {<cat>} {($ Id.VSub_DollarName '$out')})
          ]
        )
    )
    (command.ShFunction
      name: all-passing
      body: 
        (BraceGroup
          children: [
            (C {<test-tsv>})
            (C {<test-cannot-serialize>})
            (C {<echo>})
            (C {<echo>} {(DQ <'All tests in '> ($ Id.VSub_Number '$0') <' passed.'>)})
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)