(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-o)} {(nounset)})
    (C {(Id.KW_Set set)} {(-o)} {(pipefail)})
    (C {(Id.KW_Set set)} {(-o)} {(errexit)})
    (C {(source)} {(test/common.sh)})
    (command.ShFunction
      name: time-tool
      body: 
        (command.BraceGroup
          children: [
            (C 
              {
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(dirname)} {($ Id.VSub_Number '$0')})]
                    )
                ) (/time.py)
              } {(DQ ($ Id.VSub_At '$@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: test-tsv
      body: 
        (command.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: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'out=') (_tmp/time2.tsv)})
            (C {(rm)} {(-f)} {($ Id.VSub_DollarName '$out')})
            (C {(Id.KW_Set set)} {(Id.Lit_Other '+') (o)} {(errexit)})
            (command.Sentence
              child: 
                (C {(time-tool)} {(--tsv)} {(-o)} {($ Id.VSub_DollarName '$out')} {(--field)} 
                  {(single_quoted left:<Id.Left_SingleQuoteC "$'"> tokens:[<Id.Char_OneChar '\\n'>])} {(--)} {(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_SingleQuoteC "$'"> tokens:[<Id.Char_OneChar '\\t'>])} {(--)} {(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 {(Id.KW_Set set)} {(-o)} {(errexit)})
            (C {(cat)} {($ Id.VSub_DollarName '$out')})
          ]
        )
    )
    (command.ShFunction
      name: all-passing
      body: 
        (command.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 '$@'))})
  ]
)