(command.CommandList
  children: [
    (command.Simple blame_tok:<set> more_env:[] words:[{<set>} {<-e>}] redirects:[] do_fork:T)
    (command.ShFunction
      name_tok: <encode_name>
      name: encode_name
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'name='> (DQ ($ Id.VSub_Number 1))}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'result='> (DQ <test_>)}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.LogicalNot
                                  child: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_EqualTilde
                                      left: {(DQ ($ Id.VSub_DollarName name))}
                                      right: 
                                        {<Id.Lit_Other '['> <Id.Lit_Other '^'> <Id.Lit_Other '['> 
                                          <Id.Lit_Other ':'> <alnum> <Id.Lit_Other ':'> <Id.Lit_Other ']'> 
                                          (word_part.EscapedLiteral
                                            token: <Id.Lit_EscapedChar '\\ '>
                                            ch: ' '
                                          ) <_-> <Id.Lit_Other ']'>
                                        }
                                    )
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'name='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'name='> name:name)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name name>
                                  var_name: name
                                  suffix_op: 
                                    (suffix_op.PatSub
                                      pat: {<_>}
                                      replace: {<-5f>}
                                      replace_mode: Id.Lit_Slash
                                      slash_tok: <Id.VOp2_Slash _>
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'name='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'name='> name:name)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name name>
                                  var_name: name
                                  suffix_op: 
                                    (suffix_op.PatSub
                                      pat: {<->}
                                      replace: {<-2d>}
                                      replace_mode: Id.Lit_Slash
                                      slash_tok: <Id.VOp2_Slash _>
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'name='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'name='> name:name)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name name>
                                  var_name: name
                                  suffix_op: 
                                    (suffix_op.PatSub
                                      pat: {<' '>}
                                      replace: {<_>}
                                      replace_mode: Id.Lit_Slash
                                      slash_tok: <Id.VOp2_Slash _>
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'result+='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'result+='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'result+='> name:result)
                          op: assign_op.PlusEqual
                          rhs: {(DQ ($ Id.VSub_DollarName name))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [32 58]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <local>
                  more_env: []
                  words: [
                    {<local>}
                    {<Id.Lit_VarLike 'length='> 
                      (DQ 
                        (BracedVarSub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name name>
                          var_name: name
                          prefix_op: <Id.VSub_Pound '#'>
                          right: <Id.Right_DollarBrace '}'>
                        )
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <local>
                  more_env: []
                  words: [{<local>} {<char>} {<i>}]
                  redirects: []
                  do_fork: T
                )
                (command.ForExpr
                  keyword: <Id.KW_For for>
                  init: 
                    (arith_expr.BinaryAssign
                      op_id: Id.Arith_Equal
                      left: ($ Id.Lit_ArithVarLike i)
                      right: {<Id.Lit_Digits 0>}
                    )
                  cond: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Less
                      left: ($ Id.Lit_ArithVarLike i)
                      right: ($ Id.Lit_ArithVarLike length)
                    )
                  update: 
                    (arith_expr.UnaryAssign
                      op_id: Id.Node_PostDPlus
                      child: ($ Id.Lit_ArithVarLike i)
                    )
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'char='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'char='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'char='> name:char)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      left: <Id.Left_DollarBrace '${'>
                                      token: <Id.VSub_Name name>
                                      var_name: name
                                      suffix_op: 
                                        (suffix_op.Slice
                                          begin: {($ Id.VSub_DollarName i)}
                                          length: {<Id.Lit_Digits 1>}
                                        )
                                      right: <Id.Arith_RBrace _>
                                    )
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <Id.Lit_LBracket '['>
                                          more_env: []
                                          words: [
                                            {<Id.Lit_LBracket '['>}
                                            {(DQ ($ Id.VSub_DollarName char))}
                                            {<Id.Lit_Equals '='>}
                                            {(DQ <' '>)}
                                            {<Id.Lit_RBracket ']'>}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'result+='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'result+='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'result+='>
                                          name: result
                                        )
                                      op: assign_op.PlusEqual
                                      rhs: {(DQ <_>)}
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              spids: [162 179]
                            )
                            (IfArm
                              keyword: <Id.KW_Elif elif>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          left: <Id.KW_DLeftBracket '[['>
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_EqualTilde
                                              left: {(DQ ($ Id.VSub_DollarName char))}
                                              right: 
                                                {<Id.Lit_Other '['> <Id.Lit_Other '['> 
                                                  <Id.Lit_Other ':'> <alnum> <Id.Lit_Other ':'> <Id.Lit_Other ']'> <Id.Lit_Other ']'>
                                                }
                                            )
                                          right: <Id.Lit_DRightBracket ']]'>
                                          redirects: []
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.ShAssignment
                                  left: <Id.Lit_VarLike 'result+='>
                                  pairs: [
                                    (AssignPair
                                      left: <Id.Lit_VarLike 'result+='>
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'result+='>
                                          name: result
                                        )
                                      op: assign_op.PlusEqual
                                      rhs: {(DQ ($ Id.VSub_DollarName char))}
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              spids: [188 209]
                            )
                          ]
                          else_kw: <Id.KW_Else else>
                          else_action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'result+='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'result+='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'result+='>
                                      name: result
                                    )
                                  op: assign_op.PlusEqual
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (command.Simple
                                              blame_tok: <printf>
                                              more_env: []
                                              words: [
                                                {<printf>}
                                                {<-->}
                                                {(DQ <'-%02x'>)}
                                                {
                                                  (word_part.EscapedLiteral
                                                    token: <Id.Lit_EscapedChar '\\\''>
                                                    ch: '\''
                                                  ) (DQ ($ Id.VSub_DollarName char))
                                                }
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          right: <Id.Eof_RParen _>
                                        )
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName result))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'tests='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'tests='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tests='> name:tests)
          op: assign_op.Equal
          rhs: {(ShArrayLiteral left:<Id.Op_LParen _> words:[] right:<Id.Right_ShArrayLiteral _>)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'index='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'index='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'index='> name:index)
          op: assign_op.Equal
          rhs: {<0>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'pattern='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'pattern='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pattern='> name:pattern)
          op: assign_op.Equal
          rhs: {(SQ <'^ *@test  *([^ ].*)  *\\{ *(.*)$'>)}
        )
      ]
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <read>
                  more_env: [(EnvPair left:<Id.Lit_VarLike 'IFS='> name:IFS val:(rhs_word__Empty))]
                  words: [{<read>} {<-r>} {<line>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <let>
              more_env: []
              words: [{<let>} {<Id.Lit_VarLike 'index+='> <1>}]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_EqualTilde
                                  left: {(DQ ($ Id.VSub_DollarName line))}
                                  right: {($ Id.VSub_DollarName pattern)}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'quoted_name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'quoted_name='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'quoted_name='>
                              name: quoted_name
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name BASH_REMATCH>
                                  var_name: BASH_REMATCH
                                  bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>})
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'body='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'body='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'body='> name:body)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name BASH_REMATCH>
                                  var_name: BASH_REMATCH
                                  bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 2>})
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'name='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'name='> name:name)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      blame_tok: <eval>
                                      more_env: []
                                      words: [{<eval>} {<echo>} {(DQ ($ Id.VSub_DollarName quoted_name))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen _>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'encoded_name='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'encoded_name='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'encoded_name='>
                              name: encoded_name
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      blame_tok: <encode_name>
                                      more_env: []
                                      words: [{<encode_name>} {(DQ ($ Id.VSub_DollarName name))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen _>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_ArrayLhsOpen 'tests['>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_ArrayLhsOpen 'tests['>
                          lhs: 
                            (sh_lhs_expr.IndexedName
                              left: <Id.Lit_ArrayLhsOpen 'tests['>
                              name: tests
                              index: 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      left: <Id.Left_DollarBrace '${'>
                                      token: <Id.VSub_Name tests>
                                      var_name: tests
                                      prefix_op: <Id.VSub_Pound '#'>
                                      bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                      right: <Id.Right_DollarBrace '}'>
                                    )
                                  )
                                }
                            )
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName encoded_name))}
                        )
                      ]
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ (${ Id.VSub_Name encoded_name) <'() { bats_test_begin '> 
                            (${ Id.VSub_Name quoted_name) <' '> (${ Id.VSub_Name index) <'; '> (${ Id.VSub_Name body)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [292 307]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <printf>
                  more_env: []
                  words: [
                    {<printf>}
                    {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                    {(DQ ($ Id.VSub_DollarName line))}
                  ]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [test_name]
      iterable: 
        (for_iter.Words
          words: [
            {
              (DQ 
                (BracedVarSub
                  left: <Id.Left_DollarBrace '${'>
                  token: <Id.VSub_Name tests>
                  var_name: tests
                  bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                  right: <Id.Right_DollarBrace '}'>
                )
              )
            }
          ]
        )
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'bats_test_function '> (${ Id.VSub_Name test_name))}]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
  ]
)