(command.CommandList
  children: [
    (command.ShFunction
      name: test_set_editor
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FAKE_EDITOR)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [87]
                )
              ]
            )
            (C {<export>} {<FAKE_EDITOR>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EDITOR)
                  op: assign_op.Equal
                  rhs: {(SQ <'"$FAKE_EDITOR"'>)}
                  spids: [98]
                )
              ]
            )
            (C {<export>} {<EDITOR>})
          ]
        )
    )
    (command.ShFunction
      name: test_set_index_version
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_INDEX_VERSION)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [119]
                )
              ]
            )
            (C {<export>} {<GIT_INDEX_VERSION>})
          ]
        )
    )
    (command.ShFunction
      name: test_decode_color
      body: 
        (BraceGroup
          children: [
            (C {<awk>} 
              {
                (SQ <'\n'> <'\t\tfunction name(n) {\n'> <'\t\t\tif (n == 0) return "RESET";\n'> 
                  <'\t\t\tif (n == 1) return "BOLD";\n'> <'\t\t\tif (n == 30) return "BLACK";\n'> <'\t\t\tif (n == 31) return "RED";\n'> 
                  <'\t\t\tif (n == 32) return "GREEN";\n'> <'\t\t\tif (n == 33) return "YELLOW";\n'> <'\t\t\tif (n == 34) return "BLUE";\n'> 
                  <'\t\t\tif (n == 35) return "MAGENTA";\n'> <'\t\t\tif (n == 36) return "CYAN";\n'> <'\t\t\tif (n == 37) return "WHITE";\n'> 
                  <'\t\t\tif (n == 40) return "BLACK";\n'> <'\t\t\tif (n == 41) return "BRED";\n'> <'\t\t\tif (n == 42) return "BGREEN";\n'> 
                  <'\t\t\tif (n == 43) return "BYELLOW";\n'> <'\t\t\tif (n == 44) return "BBLUE";\n'> <'\t\t\tif (n == 45) return "BMAGENTA";\n'> 
                  <'\t\t\tif (n == 46) return "BCYAN";\n'> <'\t\t\tif (n == 47) return "BWHITE";\n'> <'\t\t}\n'> <'\t\t{\n'> 
                  <'\t\t\twhile (match($0, /\\033\\[[0-9;]*m/) != 0) {\n'> <'\t\t\t\tprintf "%s<", substr($0, 1, RSTART-1);\n'> 
                  <'\t\t\t\tcodes = substr($0, RSTART+2, RLENGTH-3);\n'> <'\t\t\t\tif (length(codes) == 0)\n'> <'\t\t\t\t\tprintf "%s", name(0)\n'> <'\t\t\t\telse {\n'> 
                  <'\t\t\t\t\tn = split(codes, ary, ";");\n'> <'\t\t\t\t\tsep = "";\n'> <'\t\t\t\t\tfor (i = 1; i <= n; i++) {\n'> 
                  <'\t\t\t\t\t\tprintf "%s%s", sep, name(ary[i]);\n'> <'\t\t\t\t\t\tsep = ";"\n'> <'\t\t\t\t\t}\n'> <'\t\t\t\t}\n'> <'\t\t\t\tprintf ">";\n'> 
                  <
'\t\t\t\t$0 = substr($0, RSTART + RLENGTH, length($0) - RSTART - RLENGTH + 1);\n'
                  > <'\t\t\t}\n'> <'\t\t\tprint\n'> <'\t\t}\n'> <'\t'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: lf_to_nul
      body: (BraceGroup children:[(C {<perl>} {<-pe>} {(SQ <'y/\\012/\\000/'>)})])
    )
    (command.ShFunction
      name: nul_to_q
      body: (BraceGroup children:[(C {<perl>} {<-pe>} {(SQ <'y/\\000/Q/'>)})])
    )
    (command.ShFunction
      name: q_to_nul
      body: (BraceGroup children:[(C {<perl>} {<-pe>} {(SQ <'y/Q/\\000/'>)})])
    )
    (command.ShFunction
      name: q_to_cr
      body: (BraceGroup children:[(C {<tr>} {<Q>} {(SQ <'\\015'>)})])
    )
    (command.ShFunction
      name: q_to_tab
      body: (BraceGroup children:[(C {<tr>} {<Q>} {(SQ <'\\011'>)})])
    )
    (command.ShFunction
      name: qz_to_tab_space
      body: (BraceGroup children:[(C {<tr>} {<QZ>} {(SQ <'\\011\\040'>)})])
    )
    (command.ShFunction
      name: append_cr
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [(C {<sed>} {<-e>} {(SQ <'s/$/Q/'>)}) (C {<tr>} {<Q>} {(SQ <'\\015'>)})]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: remove_cr
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [(C {<tr>} {(SQ <'\\015'>)} {<Q>}) (C {<sed>} {<-e>} {(SQ <'s/Q$//'>)})]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: sane_unset
      body: 
        (BraceGroup
          children: [
            (C {<unset>} {(DQ ($ Id.VSub_At '$@'))})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: test_tick
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {<-z>} 
                          {
                            (DQ 
                              (braced_var_sub
                                token: <Id.VSub_Name test_tick>
                                suffix_op: (suffix_op.Unary tok:<Id.VTest_Plus '+'> arg_word:{<set>})
                              )
                            )
                          }
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:test_tick)
                          op: assign_op.Equal
                          rhs: {<1112911993>}
                          spids: [425]
                        )
                      ]
                    )
                  ]
                  spids: [407 422]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:test_tick)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (word_part.ArithSub
                            anode: 
                              (arith_expr.Binary
                                op_id: Id.Arith_Plus
                                left: {($ Id.VSub_DollarName '$test_tick')}
                                right: {<Id.Lit_Digits 60>}
                              )
                          )
                        }
                      spids: [432]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_COMMITTER_DATE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$test_tick') <' -0700'>)}
                  spids: [446]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GIT_AUTHOR_DATE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$test_tick') <' -0700'>)}
                  spids: [453]
                )
              ]
            )
            (C {<export>} {<GIT_COMMITTER_DATE>} {<GIT_AUTHOR_DATE>})
          ]
        )
    )
    (command.ShFunction
      name: test_pause
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$verbose'))} {<Id.Lit_Equals '='>} 
                              {<t>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{(DQ ($ Id.VSub_DollarName '$SHELL_PATH'))}]
                      redirects: [
                        (redir
                          op: <Id.Redir_LessAnd '<&'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {<6>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<3>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<4>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  spids: [490 503]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<error>} {(DQ <'test_pause requires --verbose'>)}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<5>})]
                  do_fork: T
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: debug
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{(DQ ($ Id.VSub_At '$@'))}]
              more_env: [(env_pair name:GIT_TEST_GDB val:{<1>} spids:[558])]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: test_commit
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:notick)
                      op: assign_op.Equal
                      rhs: (word.Empty)
                      spids: [595]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:signoff)
                      op: assign_op.Equal
                      rhs: (word.Empty)
                      spids: [600]
                    )
                  ]
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {($ Id.VSub_Pound '$#')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>})
                      ]
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.Case
                          to_match: {(DQ ($ Id.VSub_Number '$1'))}
                          arms: [
                            (case_arm
                              pat_list: [{<--notick>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:notick)
                                      op: assign_op.Equal
                                      rhs: {<yes>}
                                      spids: [633]
                                    )
                                  ]
                                )
                              ]
                              spids: [629 630 637 -1]
                            )
                            (case_arm
                              pat_list: [{<--signoff>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:signoff)
                                      op: assign_op.Equal
                                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                                      spids: [644]
                                    )
                                  ]
                                )
                              ]
                              spids: [640 641 650 -1]
                            )
                            (case_arm
                              pat_list: [{<Id.Lit_Star '*'>}]
                              action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)]
                              spids: [653 654 660 -1]
                            )
                          ]
                        )
                        (C {<shift>})
                      ]
                    )
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:file)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (braced_var_sub
                            token: <Id.VSub_Number 2>
                            suffix_op: 
                              (suffix_op.Unary
                                tok: <Id.VTest_ColonHyphen ':-'>
                                arg_word: {(DQ ($ Id.VSub_Number '$1') <.t>)}
                              )
                          )
                        }
                      spids: [674]
                    )
                  ]
                )
                (command.Simple
                  words: [
                    {<echo>}
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Number 3>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VTest_Hyphen ->
                              arg_word: {($ Id.VSub_Number '$1')}
                            )
                        )
                      )
                    }
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_DollarName '$file'))}
                    )
                  ]
                  do_fork: T
                )
                (C {<git>} {<add>} {(DQ ($ Id.VSub_DollarName '$file'))})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$notick'))})]
                        )
                      action: [(C {<test_tick>})]
                      spids: [717 728]
                    )
                  ]
                )
                (C {<git>} {<commit>} {($ Id.VSub_DollarName '$signoff')} {<-m>} 
                  {(DQ ($ Id.VSub_Number '$1'))}
                )
                (C {<git>} {<tag>} 
                  {
                    (DQ 
                      (braced_var_sub
                        token: <Id.VSub_Number 4>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonHyphen ':-'>
                            arg_word: {($ Id.VSub_Number '$1')}
                          )
                      )
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_merge
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {<test_tick>})
                (C {<git>} {<merge>} {<-m>} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))})
                (C {<git>} {<tag>} {(DQ ($ Id.VSub_Number '$1'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_chmod
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<chmod>} {(DQ ($ Id.VSub_At '$@'))})
                (C {<git>} {<update-index>} {<--add>} {(DQ <'--chmod='> ($ Id.VSub_At '$@'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_unconfig
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:config_dir)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [869]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='>} {<-C>})
                      ]
                    )
                  action: [
                    (C {<shift>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:config_dir)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [891]
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                  spids: [872 885]
                )
              ]
            )
            (C {<git>} 
              {
                (braced_var_sub
                  token: <Id.VSub_Name config_dir>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonPlus ':+'>
                      arg_word: {<'-C '> (DQ ($ Id.VSub_DollarName '$config_dir'))}
                    )
                )
              } {<config>} {<--unset-all>} {(DQ ($ Id.VSub_At '$@'))}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:config_status)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [921]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$config_status'))}
              arms: [
                (case_arm
                  pat_list: [{<5>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:config_status)
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [941]
                        )
                      ]
                    )
                  ]
                  spids: [934 935 945 -1]
                )
              ]
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {($ Id.VSub_DollarName '$config_status')}
            )
          ]
        )
    )
    (command.ShFunction
      name: test_config
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:config_dir)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [969]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='>} {<-C>})
                      ]
                    )
                  action: [
                    (C {<shift>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:config_dir)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [991]
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                  spids: [972 985]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<test_when_finished>} 
                  {
                    (DQ <'test_unconfig '> 
                      (braced_var_sub
                        token: <Id.VSub_Name config_dir>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonPlus ':+'>
                            arg_word: {<'-C \''> ($ Id.VSub_DollarName '$config_dir') <'\''>}
                          )
                      ) <' \''> ($ Id.VSub_Number '$1') <'\''>
                    )
                  }
                )
                (C {<git>} 
                  {
                    (braced_var_sub
                      token: <Id.VSub_Name config_dir>
                      suffix_op: 
                        (suffix_op.Unary
                          tok: <Id.VTest_ColonPlus ':+'>
                          arg_word: {<'-C '> (DQ ($ Id.VSub_DollarName '$config_dir'))}
                        )
                    )
                  } {<config>} {(DQ ($ Id.VSub_At '$@'))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_config_global
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<test_when_finished>} 
                  {(DQ <'test_unconfig --global \''> ($ Id.VSub_Number '$1') <'\''>)}
                )
                (C {<git>} {<config>} {<--global>} {(DQ ($ Id.VSub_At '$@'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: write_script
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (BraceGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<echo>} 
                          {
                            (DQ <'#!'> 
                              (braced_var_sub
                                token: <Id.VSub_Number 2>
                                suffix_op: 
                                  (suffix_op.Unary
                                    tok: <Id.VTest_Hyphen ->
                                    arg_word: {(DQ ($ Id.VSub_DollarName '$SHELL_PATH'))}
                                  )
                              )
                            )
                          }
                        )
                        (C {<cat>})
                      ]
                    )
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_Number '$1'))}
                    )
                  ]
                )
                (C {<chmod>} {<Id.Lit_Other '+'> <x>} {(DQ ($ Id.VSub_Number '$1'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_set_prereq
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:satisfied_prereq)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$satisfied_prereq') ($ Id.VSub_Number '$1') <' '>)}
                  spids: [1163]
                )
              ]
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:satisfied_prereq)
          op: assign_op.Equal
          rhs: {(DQ <' '>)}
          spids: [1172]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:lazily_testable_prereq)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [1177]
        )
        (assign_pair
          lhs: (sh_lhs_expr.Name name:lazily_tested_prereq)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [1179]
        )
      ]
    )
    (command.ShFunction
      name: test_lazy_prereq
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:lazily_testable_prereq)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName '$lazily_testable_prereq') ($ Id.VSub_Number '$1') 
                        <' '>
                      )
                    }
                  spids: [1193]
                )
              ]
            )
            (C {<eval>} 
              {<test_prereq_lazily_> ($ Id.VSub_Number '$1') <Id.Lit_Equals '='> 
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <2>
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: test_run_lazy_prereq_
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:script)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (SQ <'\n'> <'mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&\n'> <'(\n'> 
                        <'\tcd "$TRASH_DIRECTORY/prereq-test-dir" &&'>
                      ) (DQ ($ Id.VSub_Number '$2')) (SQ <'\n'> <')'>)
                    }
                  spids: [1220]
                )
              ]
            )
            (command.Simple
              words: [{<say>} {(DQ <'checking prerequisite: '> ($ Id.VSub_Number '$1'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
              do_fork: T
            )
            (command.Simple
              words: [{<say>} {(DQ ($ Id.VSub_DollarName '$script'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
              do_fork: T
            )
            (C {<test_eval_>} {(DQ ($ Id.VSub_DollarName '$script'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:eval_ret)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [1264]
                )
              ]
            )
            (C {<rm>} {<-rf>} {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') <'/prereq-test-dir'>)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$eval_ret'))} {<Id.Lit_Equals '='>} 
                              {<0>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<say>} {(DQ <'prerequisite '> ($ Id.VSub_Number '$1') <' ok'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
                      do_fork: T
                    )
                  ]
                  spids: [1278 1291]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<say>} {(DQ <'prerequisite '> ($ Id.VSub_Number '$1') <' not satisfied'>)}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
                  do_fork: T
                )
              ]
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {($ Id.VSub_DollarName '$eval_ret')}
            )
          ]
        )
    )
    (command.ShFunction
      name: test_have_prereq
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:save_IFS)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$IFS')}
                  spids: [1343]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {<Id.Lit_Comma ','>}
                  spids: [1347]
                )
              ]
            )
            (C {<set>} {<-->} {($ Id.VSub_Star '$*')})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$save_IFS')}
                  spids: [1358]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:total_prereq)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [1363]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ok_prereq)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [1367]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:missing_prereq)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [1371]
                )
              ]
            )
            (command.ForEach
              iter_name: prerequisite
              do_arg_iter: T
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$prerequisite'))}
                      arms: [
                        (case_arm
                          pat_list: [{<Id.KW_Bang '!'> <Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:negative_prereq)
                                  op: assign_op.Equal
                                  rhs: {<t>}
                                  spids: [1397]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:prerequisite)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name prerequisite>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            tok: <Id.VOp1_Pound '#'>
                                            arg_word: {<Id.Lit_Other '!'>}
                                          )
                                      )
                                    }
                                  spids: [1401]
                                )
                              ]
                            )
                          ]
                          spids: [1392 1394 1409 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:negative_prereq)
                                  op: assign_op.Equal
                                  rhs: (word.Empty)
                                  spids: [1416]
                                )
                              ]
                            )
                          ]
                          spids: [1412 1413 -1 1419]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ <' '> ($ Id.VSub_DollarName '$lazily_tested_prereq') <' '>)}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> (DQ <' '> ($ Id.VSub_DollarName '$prerequisite') <' '>) 
                              <Id.Lit_Star '*'>
                            }
                          ]
                          spids: [1434 1441 1444 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.Case
                              to_match: 
                                {(DQ <' '> ($ Id.VSub_DollarName '$lazily_testable_prereq') <' '>)}
                              arms: [
                                (case_arm
                                  pat_list: [
                                    {<Id.Lit_Star '*'> 
                                      (DQ <' '> ($ Id.VSub_DollarName '$prerequisite') <' '>) <Id.Lit_Star '*'>
                                    }
                                  ]
                                  action: [
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {<eval>} 
                                          {
                                            (DQ <'script='> 
                                              (word_part.EscapedLiteral
                                                token: <Id.Lit_EscapedChar '\\$'>
                                              ) <test_prereq_lazily_> ($ Id.VSub_DollarName '$prerequisite')
                                            )
                                          }
                                        )
                                        (command.If
                                          arms: [
                                            (if_arm
                                              cond: 
                                                (condition.Shell
                                                  commands: [
                                                    (C {<test_run_lazy_prereq_>} 
                                                      {(DQ ($ Id.VSub_DollarName '$prerequisite'))} {(DQ ($ Id.VSub_DollarName '$script'))}
                                                    )
                                                  ]
                                                )
                                              action: [
                                                (C {<test_set_prereq>} 
                                                  {($ Id.VSub_DollarName '$prerequisite')}
                                                )
                                              ]
                                              spids: [1484 1497]
                                            )
                                          ]
                                        )
                                      ]
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:lazily_tested_prereq)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName '$lazily_tested_prereq') 
                                                ($ Id.VSub_DollarName '$prerequisite') <' '>
                                              )
                                            }
                                          spids: [1508]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [1462 1469 -1 1516]
                                )
                              ]
                            )
                          ]
                          spids: [1447 1448 1519 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:total_prereq)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: {($ Id.VSub_DollarName '$total_prereq')}
                                    right: {<Id.Lit_Digits 1>}
                                  )
                              )
                            }
                          spids: [1526]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$satisfied_prereq'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {<Id.Lit_Star '*'> (DQ <' '> ($ Id.VSub_DollarName '$prerequisite') <' '>) 
                              <Id.Lit_Star '*'>
                            }
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:satisfied_this_prereq)
                                  op: assign_op.Equal
                                  rhs: {<t>}
                                  spids: [1556]
                                )
                              ]
                            )
                          ]
                          spids: [1546 1553 1560 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:satisfied_this_prereq)
                                  op: assign_op.Equal
                                  rhs: (word.Empty)
                                  spids: [1567]
                                )
                              ]
                            )
                          ]
                          spids: [1563 1564 -1 1570]
                        )
                      ]
                    )
                    (command.Case
                      to_match: 
                        {
                          (DQ ($ Id.VSub_DollarName '$satisfied_this_prereq') <','> 
                            ($ Id.VSub_DollarName '$negative_prereq')
                          )
                        }
                      arms: [
                        (case_arm
                          pat_list: [{<t> <Id.Lit_Comma ','>} {<Id.Lit_Comma ','> <t>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ok_prereq)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: {($ Id.VSub_DollarName '$ok_prereq')}
                                            right: {<Id.Lit_Digits 1>}
                                          )
                                      )
                                    }
                                  spids: [1593]
                                )
                              ]
                            )
                          ]
                          spids: [1585 1590 1604 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:prerequisite)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name negative_prereq>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            tok: <Id.VTest_ColonPlus ':+'>
                                            arg_word: {<Id.Lit_Other '!'>}
                                          )
                                      ) ($ Id.VSub_DollarName '$prerequisite')
                                    }
                                  spids: [1619]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<test>} {<-z>} 
                                          {(DQ ($ Id.VSub_DollarName '$missing_prereq'))}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:missing_prereq)
                                          op: assign_op.Equal
                                          rhs: {($ Id.VSub_DollarName '$prerequisite')}
                                          spids: [1642]
                                        )
                                      ]
                                    )
                                  ]
                                  spids: [1628 1639]
                                )
                              ]
                              else_action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:missing_prereq)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ ($ Id.VSub_DollarName '$prerequisite') <','> 
                                            ($ Id.VSub_DollarName '$missing_prereq')
                                          )
                                        }
                                      spids: [1649]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                          spids: [1607 1608 -1 1660]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<test>} {($ Id.VSub_DollarName '$total_prereq')} {<Id.Lit_Equals '='>} 
              {($ Id.VSub_DollarName '$ok_prereq')}
            )
          ]
        )
    )
    (command.ShFunction
      name: test_declared_prereq
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ <','> ($ Id.VSub_DollarName '$test_prereq') <','>)}
              arms: [
                (case_arm
                  pat_list: [
                    {<Id.Lit_Star '*'> <Id.Lit_Comma ','> ($ Id.VSub_Number '$1') <Id.Lit_Comma ','> 
                      <Id.Lit_Star '*'>
                    }
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1697 1702 1710 -1]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: test_verify_prereq
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe Id.Op_DPipe]
              children: [
                (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$test_prereq'))})
                (command.Simple
                  words: [
                    {<expr>}
                    {(DQ ($ Id.VSub_DollarName '$test_prereq'))}
                    {<Id.Lit_Colon ':'>}
                    {(SQ <'[A-Z0-9_,!]*$'>)}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (C {<error>} 
                  {
                    (DQ <'bug in the test script: \''> ($ Id.VSub_DollarName '$test_prereq') 
                      <'\' does not look like a prereq'>
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_expect_failure
      body: 
        (BraceGroup
          children: [
            (C {<test_start_>})
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<3>})
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:test_prereq)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_Number '$1')}
                              spids: [1796]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (C {<shift>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:test_prereq)
                      op: assign_op.Equal
                      rhs: (word.Empty)
                      spids: [1807]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<2>})
                (C {<error>} 
                  {(DQ <'bug in the test script: not 2 or 3 parameters to test-expect-failure'>)}
                )
              ]
            )
            (C {<test_verify_prereq>})
            (C {<export>} {<test_prereq>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [(C {<test_skip>} {(DQ ($ Id.VSub_At '$@'))})]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<say>} {(DQ <'checking known breakage: '> ($ Id.VSub_Number '$2'))}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<test_run_>} {(DQ ($ Id.VSub_Number '$2'))} {<expecting_failure>})
                              ]
                            )
                          action: [(C {<test_known_broken_ok_>} {(DQ ($ Id.VSub_Number '$1'))})]
                          spids: [1863 1874]
                        )
                      ]
                      else_action: [(C {<test_known_broken_failure_>} {(DQ ($ Id.VSub_Number '$1'))})]
                    )
                  ]
                  spids: [1838 1849]
                )
              ]
            )
            (C {<test_finish_>})
          ]
        )
    )
    (command.ShFunction
      name: test_expect_success
      body: 
        (BraceGroup
          children: [
            (C {<test_start_>})
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<3>})
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:test_prereq)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_Number '$1')}
                              spids: [1930]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (C {<shift>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:test_prereq)
                      op: assign_op.Equal
                      rhs: (word.Empty)
                      spids: [1941]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<2>})
                (C {<error>} 
                  {(DQ <'bug in the test script: not 2 or 3 parameters to test-expect-success'>)}
                )
              ]
            )
            (C {<test_verify_prereq>})
            (C {<export>} {<test_prereq>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [(C {<test_skip>} {(DQ ($ Id.VSub_At '$@'))})]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<say>} {(DQ <'expecting success: '> ($ Id.VSub_Number '$2'))}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [(C {<test_run_>} {(DQ ($ Id.VSub_Number '$2'))})]
                            )
                          action: [(C {<test_ok_>} {(DQ ($ Id.VSub_Number '$1'))})]
                          spids: [1997 2006]
                        )
                      ]
                      else_action: [(C {<test_failure_>} {(DQ ($ Id.VSub_At '$@'))})]
                    )
                  ]
                  spids: [1972 1983]
                )
              ]
            )
            (C {<test_finish_>})
          ]
        )
    )
    (command.ShFunction
      name: test_external
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<4>})
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:test_prereq)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_Number '$1')}
                              spids: [2083]
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (C {<shift>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:test_prereq)
                      op: assign_op.Equal
                      rhs: (word.Empty)
                      spids: [2094]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<3>})
                (command.Simple
                  words: [
                    {<error>}
                    {(DQ <'bug in the test script: not 3 or 4 parameters to test_external'>)}
                  ]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<5>})]
                  do_fork: T
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:descr)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [2120]
                )
              ]
            )
            (C {<shift>})
            (C {<test_verify_prereq>})
            (C {<export>} {<test_prereq>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<test_skip>} {(DQ ($ Id.VSub_DollarName '$descr'))} 
                              {(DQ ($ Id.VSub_At '$@'))}
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<say_color>} {(DQ )} 
                      {
                        (DQ <'# run '> ($ Id.VSub_DollarName '$test_count') <': '> 
                          ($ Id.VSub_DollarName '$descr') <' ('> ($ Id.VSub_Star '$*') <')'>
                        )
                      }
                    )
                    (C {<export>} {<TEST_DIRECTORY>} {<TRASH_DIRECTORY>} {<GIT_TEST_LONG>})
                    (command.Simple
                      words: [{(DQ ($ Id.VSub_At '$@'))}]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<4>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<test>} {(DQ ($ Id.VSub_QMark '$?'))} {<Id.Lit_Equals '='>} {<0>})
                              ]
                            )
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<test>} 
                                              {($ Id.VSub_DollarName '$test_external_has_tap')} {<-eq>} {<0>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [(C {<test_ok_>} {(DQ ($ Id.VSub_DollarName '$descr'))})]
                                  spids: [2232 2243]
                                )
                              ]
                              else_action: [
                                (C {<say_color>} {(DQ )} 
                                  {
                                    (DQ <'# test_external test '> ($ Id.VSub_DollarName '$descr') 
                                      <' was ok'>
                                    )
                                  }
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:test_success)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (word_part.ArithSub
                                            anode: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Plus
                                                left: {($ Id.VSub_DollarName '$test_success')}
                                                right: {<Id.Lit_Digits 1>}
                                              )
                                          )
                                        }
                                      spids: [2268]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                          spids: [2216 2229]
                        )
                      ]
                      else_action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (C {<test>} {($ Id.VSub_DollarName '$test_external_has_tap')} 
                                          {<-eq>} {<0>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<test_failure_>} {(DQ ($ Id.VSub_DollarName '$descr'))} 
                                  {(DQ ($ Id.VSub_At '$@'))}
                                )
                              ]
                              spids: [2285 2296]
                            )
                          ]
                          else_action: [
                            (C {<say_color>} {<error>} 
                              {
                                (DQ <'# test_external test '> ($ Id.VSub_DollarName '$descr') 
                                  <' failed: '> ($ Id.VSub_At '$@')
                                )
                              }
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:test_failure)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSub
                                        anode: 
                                          (arith_expr.Binary
                                            op_id: Id.Arith_Plus
                                            left: {($ Id.VSub_DollarName '$test_failure')}
                                            right: {<Id.Lit_Digits 1>}
                                          )
                                      )
                                    }
                                  spids: [2325]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [2137 2152]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_external_without_stderr
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tmp)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name TMPDIR>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonHyphen ':-'>
                            arg_word: {<Id.Lit_Slash '/'> <tmp>}
                          )
                      )
                    }
                  spids: [2369]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:stderr)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName '$tmp') <'/git-external-stderr.'> 
                        ($ Id.VSub_Dollar '$$') <.tmp>
                      )
                    }
                  spids: [2378]
                )
              ]
            )
            (command.Simple
              words: [{<test_external>} {(DQ ($ Id.VSub_At '$@'))}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '4>'>
                  loc: (redir_loc.Fd fd:4)
                  arg: {(DQ ($ Id.VSub_DollarName '$stderr'))}
                )
              ]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {<-f>} {(DQ ($ Id.VSub_DollarName '$stderr'))})
                (C {<error>} 
                  {(DQ <'Internal error: '> ($ Id.VSub_DollarName '$stderr') <' disappeared.'>)}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:descr)
                  op: assign_op.Equal
                  rhs: {(DQ <'no stderr: '> ($ Id.VSub_Number '$1'))}
                  spids: [2419]
                )
              ]
            )
            (C {<shift>})
            (command.Simple
              words: [{<say>} {(DQ <'# expecting no stderr from previous command'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<3>})]
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {<Id.KW_Bang '!'>} {<-s>} {(DQ ($ Id.VSub_DollarName '$stderr'))})
                      ]
                    )
                  action: [
                    (C {<rm>} {(DQ ($ Id.VSub_DollarName '$stderr'))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<test>} {($ Id.VSub_DollarName '$test_external_has_tap')} 
                                      {<-eq>} {<0>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(C {<test_ok_>} {(DQ ($ Id.VSub_DollarName '$descr'))})]
                          spids: [2463 2474]
                        )
                      ]
                      else_action: [
                        (C {<say_color>} {(DQ )} 
                          {
                            (DQ <'# test_external_without_stderr test '> 
                              ($ Id.VSub_DollarName '$descr') <' was ok'>
                            )
                          }
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:test_success)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (word_part.ArithSub
                                    anode: 
                                      (arith_expr.Binary
                                        op_id: Id.Arith_Plus
                                        left: {($ Id.VSub_DollarName '$test_success')}
                                        right: {<Id.Lit_Digits 1>}
                                      )
                                  )
                                }
                              spids: [2499]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [2439 2452]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$verbose'))} {<Id.Lit_Equals '='>} 
                              {<t>}
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:output)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (command.CommandList
                                        children: [
                                          (command.Sentence
                                            child: (C {<echo>})
                                            terminator: <Id.Op_Semi _>
                                          )
                                          (command.Sentence
                                            child: (C {<echo>} {(DQ <'# Stderr is:'>)})
                                            terminator: <Id.Op_Semi _>
                                          )
                                          (C {<cat>} {(DQ ($ Id.VSub_DollarName '$stderr'))})
                                        ]
                                      )
                                  )
                                }
                              spids: [2532]
                            )
                          ]
                        )
                      ]
                      spids: [2516 2529]
                    )
                  ]
                  else_action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:output)
                          op: assign_op.Equal
                          rhs: (word.Empty)
                          spids: [2555]
                        )
                      ]
                    )
                  ]
                )
                (C {<rm>} {(DQ ($ Id.VSub_DollarName '$stderr'))})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<test>} {($ Id.VSub_DollarName '$test_external_has_tap')} {<-eq>} 
                                  {<0>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<test_failure_>} {(DQ ($ Id.VSub_DollarName '$descr'))} 
                          {(DQ ($ Id.VSub_At '$@'))} {(DQ ($ Id.VSub_DollarName '$output'))}
                        )
                      ]
                      spids: [2572 2583]
                    )
                  ]
                  else_action: [
                    (C {<say_color>} {<error>} 
                      {
                        (DQ <'# test_external_without_stderr test '> ($ Id.VSub_DollarName '$descr') 
                          <' failed: '> ($ Id.VSub_At '$@') <': '> ($ Id.VSub_DollarName '$output')
                        )
                      }
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:test_failure)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: {($ Id.VSub_DollarName '$test_failure')}
                                    right: {<Id.Lit_Digits 1>}
                                  )
                              )
                            }
                          spids: [2618]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_path_is_file
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [(C {<test>} {<-f>} {(DQ ($ Id.VSub_Number '$1'))})]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'File '> ($ Id.VSub_Number '$1') <' doesn\'t exist. '> 
                          ($ Id.VSub_Number '$2')
                        )
                      }
                    )
                    (C {<false>})
                  ]
                  spids: [2654 2667]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_path_is_dir
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [(C {<test>} {<-d>} {(DQ ($ Id.VSub_Number '$1'))})]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'Directory '> ($ Id.VSub_Number '$1') <' doesn\'t exist. '> 
                          ($ Id.VSub_Number '$2')
                        )
                      }
                    )
                    (C {<false>})
                  ]
                  spids: [2696 2709]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_dir_is_empty
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<test_path_is_dir>} {(DQ ($ Id.VSub_Number '$1'))})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<test>} {<-n>} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (command.Pipeline
                                        children: [
                                          (C {<ls>} {<-a1>} {(DQ ($ Id.VSub_Number '$1'))})
                                          (C {<egrep>} {<-v>} {(SQ <'^\\.\\.?$'>)})
                                        ]
                                        negated: F
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                      action: [
                        (C {<echo>} 
                          {
                            (DQ <'Directory \''> ($ Id.VSub_Number '$1') 
                              <'\' is not empty, it contains:'>
                            )
                          }
                        )
                        (C {<ls>} {<-la>} {(DQ ($ Id.VSub_Number '$1'))})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [2750 2779]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_path_is_missing
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-e>} {(DQ ($ Id.VSub_Number '$1'))})]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Path exists:'>)})
                    (C {<ls>} {<-ld>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [(C {<test>} {($ Id.VSub_Pound '$#')} {<-ge>} {<1>})]
                            )
                          action: [(C {<echo>} {(DQ ($ Id.VSub_Star '$*'))})]
                          spids: [2848 2859]
                        )
                      ]
                    )
                    (C {<false>})
                  ]
                  spids: [2818 2829]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_line_count
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {($ Id.VSub_Pound '$#')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<3>})
                      ]
                    )
                  action: [
                    (C {<error>} {(DQ <'bug in the test script: not 3 parameters to test_line_count'>)})
                  ]
                  spids: [2919 2931]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<test>} 
                              {
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      words: [{<wc>} {<-l>}]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_Less '<'>
                                          loc: (redir_loc.Fd fd:0)
                                          arg: {(DQ ($ Id.VSub_Number '$3'))}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                )
                              } {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))}
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'test_line_count: line count for '> ($ Id.VSub_Number '$3') <' !'> 
                          ($ Id.VSub_Number '$1') <' '> ($ Id.VSub_Number '$2')
                        )
                      }
                    )
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$3'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [2941 2967]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: list_contains
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ <','> ($ Id.VSub_Number '$1') <','>)}
              arms: [
                (case_arm
                  pat_list: [
                    {<Id.Lit_Star '*'> <Id.Lit_Comma ','> ($ Id.VSub_Number '$2') <Id.Lit_Comma ','> 
                      <Id.Lit_Star '*'>
                    }
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [3034 3039 3047 -1]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: test_must_fail
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{<Id.Lit_VarLike 'ok='> <Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_test_ok)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Number 1>
                                suffix_op: (suffix_op.Unary tok:<Id.VOp1_Pound '#'> arg_word:{<'ok='>})
                              )
                            }
                          spids: [3116]
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                  spids: [3111 3113 3127 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_test_ok)
                          op: assign_op.Equal
                          rhs: (word.Empty)
                          spids: [3134]
                        )
                      ]
                    )
                  ]
                  spids: [3130 3131 3137 -1]
                )
              ]
            )
            (C {(DQ ($ Id.VSub_At '$@'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:exit_code)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [3148]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<test>} {($ Id.VSub_DollarName '$exit_code')} {<-eq>} {<0>})
                            (command.Pipeline
                              children: [
                                (C {<list_contains>} {(DQ ($ Id.VSub_DollarName '$_test_ok'))} 
                                  {<success>}
                                )
                              ]
                              negated: T
                            )
                          ]
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'test_must_fail: command succeeded: '> ($ Id.VSub_Star '$*'))}
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3152 3175]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<test_match_signal>} {<13>} {($ Id.VSub_DollarName '$exit_code')})
                            (C {<list_contains>} {(DQ ($ Id.VSub_DollarName '$_test_ok'))} {<sigpipe>})
                          ]
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [3194 3213]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<test>} {($ Id.VSub_DollarName '$exit_code')} {<-gt>} {<129>})
                            (C {<test>} {($ Id.VSub_DollarName '$exit_code')} {<-le>} {<192>})
                          ]
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'test_must_fail: died by signal '> 
                            (word_part.ArithSub
                              anode: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_Minus
                                  left: {($ Id.VSub_DollarName '$exit_code')}
                                  right: {<Id.Lit_Digits 128>}
                                )
                            ) <': '> ($ Id.VSub_Star '$*')
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3221 3242]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {($ Id.VSub_DollarName '$exit_code')} {<-eq>} {<127>})]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'test_must_fail: command not found: '> ($ Id.VSub_Star '$*'))}
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3270 3281]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {($ Id.VSub_DollarName '$exit_code')} {<-eq>} {<126>})]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'test_must_fail: valgrind error: '> ($ Id.VSub_Star '$*'))}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3300 3311]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (command.ShFunction
      name: test_might_fail
      body: 
        (BraceGroup
          children: [
            (C {<test_must_fail>} {<Id.Lit_VarLike 'ok='> <success>} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: test_expect_code
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:want_code)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [3418]
                )
              ]
            )
            (C {<shift>})
            (C {(DQ ($ Id.VSub_At '$@'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:exit_code)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [3430]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {($ Id.VSub_DollarName '$exit_code')} {<Id.Lit_Equals '='>} 
                          {($ Id.VSub_DollarName '$want_code')}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [3434 3445]
                )
              ]
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'test_expect_code: command exited with '> ($ Id.VSub_DollarName '$exit_code') 
                    <', we wanted '> ($ Id.VSub_DollarName '$want_code') <' '> ($ Id.VSub_Star '$*')
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: test_cmp
      body: 
        (BraceGroup
          children: [(C {($ Id.VSub_DollarName '$GIT_TEST_CMP')} {(DQ ($ Id.VSub_At '$@'))})]
        )
    )
    (command.ShFunction
      name: test_cmp_bin
      body: (BraceGroup children:[(C {<cmp>} {(DQ ($ Id.VSub_At '$@'))})])
    )
    (command.ShFunction
      name: verbose
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(DQ ($ Id.VSub_At '$@'))})
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'command failed: '> 
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<git>} {<rev-parse>} {<--sq-quote>} {(DQ ($ Id.VSub_At '$@'))})
                    )
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: test_must_be_empty
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-s>} {(DQ ($ Id.VSub_Number '$1'))})]
                    )
                  action: [
                    (C {<echo>} {(DQ <'\''> ($ Id.VSub_Number '$1') <'\' is not empty, it contains:'>)})
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3623 3634]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_cmp_rev
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [{<git>} {<rev-parse>} {<--verify>} {(DQ ($ Id.VSub_Number '$1'))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<expect.rev>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{<git>} {<rev-parse>} {<--verify>} {(DQ ($ Id.VSub_Number '$2'))}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<actual.rev>}
                    )
                  ]
                  do_fork: T
                )
                (C {<test_cmp>} {<expect.rev>} {<actual.rev>})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_seq
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_Pound '$#')}
              arms: [
                (case_arm
                  pat_list: [{<1>}]
                  action: [(C {<set>} {<1>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [3752 3753 3763 -1]
                )
                (case_arm pat_list:[{<2>}] spids:[3766 3767 3769 -1])
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<error>} {(DQ <'bug in the test script: not 1 or 2 parameters to test_seq'>)})
                  ]
                  spids: [3772 3773 3781 -1]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:test_seq_counter__)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [3787]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (C {<test>} {(DQ ($ Id.VSub_DollarName '$test_seq_counter__'))} {<-le>} 
                      {(DQ ($ Id.VSub_Number '$2'))}
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (C {<echo>} {(DQ ($ Id.VSub_DollarName '$test_seq_counter__'))})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:test_seq_counter__)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: {($ Id.VSub_DollarName '$test_seq_counter__')}
                                    right: {<Id.Lit_Digits 1>}
                                  )
                              )
                            }
                          spids: [3816]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: test_when_finished
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} 
                  {
                    (DQ 
                      (braced_var_sub
                        token: <Id.VSub_Name BASH_SUBSHELL>
                        suffix_op: (suffix_op.Unary tok:<Id.VTest_Hyphen -> arg_word:{<0>})
                      )
                    )
                  } {<Id.Lit_Equals '='>} {<0>}
                )
                (C {<error>} 
                  {(DQ <'bug in test script: test_when_finished does nothing in a subshell'>)}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:test_cleanup)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'{ '> ($ Id.VSub_Star '$*') <'\n'> <'\t\t} && (exit '> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <eval_ret> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                        ) <'); eval_ret='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'?; '> 
                        ($ Id.VSub_DollarName '$test_cleanup')
                      )
                    }
                  spids: [3945]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_create_repo
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.Lit_Equals '='>} {<1>})
                (C {<error>} {(DQ <'bug in the test script: not 1 parameter to test-create-repo'>)})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:repo)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [3998]
                )
              ]
            )
            (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$repo'))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Subshell
                  child: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$repo'))})
                            (C {<error>} {(DQ <'Cannot setup test environment'>)})
                          ]
                        )
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (command.Simple
                              words: [
                                {(DQ ($ Id.VSub_DollarName '$GIT_EXEC_PATH') <'/git-init'>)}
                                {
                                  (DQ <'--template='> ($ Id.VSub_DollarName '$GIT_BUILD_DIR') 
                                    <'/templates/blt/'>
                                  )
                                }
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<3>}
                                )
                                (redir
                                  op: <Id.Redir_GreatAnd '2>&'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<4>}
                                )
                              ]
                              do_fork: T
                            )
                            (C {<error>} {(DQ <'cannot run git init -- have you built things yet?'>)})
                          ]
                        )
                        (C {<mv>} {<'.git/hooks'>} {<'.git/hooks-disabled'>})
                      ]
                    )
                )
                (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_ln_s_add
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: (condition.Shell commands:[(C {<test_have_prereq>} {<SYMLINKS>})])
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<ln>} {<-s>} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))})
                        (C {<git>} {<update-index>} {<--add>} {(DQ ($ Id.VSub_Number '$2'))})
                      ]
                    )
                  ]
                  spids: [4095 4102]
                )
              ]
              else_action: [
                (command.AndOr
                  ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
                  children: [
                    (command.Simple
                      words: [{<printf>} {(SQ <'%s'>)} {(DQ ($ Id.VSub_Number '$1'))}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {(DQ ($ Id.VSub_Number '$2'))}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ln_s_obj)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<git>} {<hash-object>} {<-w>} {(DQ ($ Id.VSub_Number '$2'))})
                              )
                            }
                          spids: [4152]
                        )
                      ]
                    )
                    (C {<git>} {<update-index>} {<--add>} {<--cacheinfo>} {<120000>} 
                      {($ Id.VSub_DollarName '$ln_s_obj')} {(DQ ($ Id.VSub_Number '$2'))}
                    )
                    (C {<git>} {<update-index>} {(DQ ($ Id.VSub_Number '$2'))})
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_write_lines
      body: 
        (BraceGroup
          children: [
            (C {<printf>} {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: perl
      body: 
        (BraceGroup
          children: [
            (C {<command>} {(DQ ($ Id.VSub_DollarName '$PERL_PATH'))} {(DQ ($ Id.VSub_At '$@'))})
          ]
        )
    )
    (command.ShFunction
      name: test_normalize_bool
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [
                {<git>}
                {<-c>}
                {<magic.variable> <Id.Lit_Equals '='> (DQ ($ Id.VSub_Number '$1'))}
                {<config>}
                {<--bool>}
                {<magic.variable>}
              ]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: test_tristate
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<eval>} 
                          {
                            (DQ <'test x'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                              (word_part.EscapedLiteral
                                token: <Id.Lit_EscapedChar '\\$'>
                              ) <'{'> ($ Id.VSub_Number '$1') <'+isset}'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                              <' = xisset'>
                            )
                          }
                        )
                      ]
                    )
                  action: [
                    (C {<eval>} 
                      {
                        (DQ <'\n'> <'\t\t\tcase '> 
                          (word_part.EscapedLiteral
                            token: <Id.Lit_EscapedChar '\\"'>
                          ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) ($ Id.VSub_Number '$1') 
                          (word_part.EscapedLiteral
                            token: <Id.Lit_EscapedChar '\\"'>
                          ) <' in\n'> <'\t\t\t\'\')\t'> ($ Id.VSub_Number '$1') <'=false ;;\n'> <'\t\t\tauto)\t;;\n'> <'\t\t\t*)\t'> 
                          ($ Id.VSub_Number '$1') <'='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'(test_normalize_bool '> 
                          (word_part.EscapedLiteral
                            token: <Id.Lit_EscapedChar '\\$'>
                          ) ($ Id.VSub_Number '$1') <' || echo true) ;;\n'> <'\t\t\tesac\n'> <'\t\t'>
                        )
                      }
                    )
                  ]
                  spids: [4339 4355]
                )
              ]
              else_action: [(C {<eval>} {(DQ ($ Id.VSub_Number '$1') <'=auto'>)})]
            )
          ]
        )
    )
    (command.ShFunction
      name: test_skip_or_die
      body: 
        (BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{<auto>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:skip_all)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$2')}
                          spids: [4447]
                        )
                      ]
                    )
                    (C {<test_done>})
                  ]
                  spids: [4443 4444 4454 -1]
                )
                (case_arm
                  pat_list: [{<true>}]
                  action: [(C {<error>} {(DQ ($ Id.VSub_Number '$2'))})]
                  spids: [4457 4458 4468 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<error>} 
                      {
                        (DQ <'BUG: test tristate is \''> ($ Id.VSub_Number '$1') <'\' (real error: '> 
                          ($ Id.VSub_Number '$2') <')'>
                        )
                      }
                    )
                  ]
                  spids: [4471 4472 -1 4486]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: mingw_test_cmp
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'test_cmp_a='>} {<Id.Lit_VarLike 'test_cmp_b='>})
            (C {<local>} {<Id.Lit_VarLike 'stdin_for_diff='>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<test>} {<-s>} {(DQ ($ Id.VSub_Number '$1'))})
                            (C {<test>} {<-s>} {(DQ ($ Id.VSub_Number '$2'))})
                          ]
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<mingw_read_file_strip_cr_>} {<test_cmp_a>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(DQ ($ Id.VSub_Number '$1'))}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      words: [{<mingw_read_file_strip_cr_>} {<test_cmp_b>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(DQ ($ Id.VSub_Number '$2'))}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  spids: [4554 4575]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<test>} {<-s>} {(DQ ($ Id.VSub_Number '$1'))})
                            (C {<test>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_Equals '='>} {<->})
                          ]
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<mingw_read_file_strip_cr_>} {<test_cmp_a>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(DQ ($ Id.VSub_Number '$1'))}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<mingw_read_file_strip_cr_>} {<test_cmp_b>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:stdin_for_diff)
                          op: assign_op.Equal
                          rhs: {(SQ <'<<<"$test_cmp_b"'>)}
                          spids: [4647]
                        )
                      ]
                    )
                  ]
                  spids: [4602 4625]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<test>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='>} {<->})
                            (C {<test>} {<-s>} {(DQ ($ Id.VSub_Number '$2'))})
                          ]
                        )
                      ]
                    )
                  action: [
                    (C {<mingw_read_file_strip_cr_>} {<test_cmp_a>})
                    (command.Simple
                      words: [{<mingw_read_file_strip_cr_>} {<test_cmp_b>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Less '<'>
                          loc: (redir_loc.Fd fd:0)
                          arg: {(DQ ($ Id.VSub_Number '$2'))}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:stdin_for_diff)
                          op: assign_op.Equal
                          rhs: {(SQ <'<<<"$test_cmp_a"'>)}
                          spids: [4698]
                        )
                      ]
                    )
                  ]
                  spids: [4653 4676]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$test_cmp_a'))})
                (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$test_cmp_b'))})
                (C {<test>} {(DQ ($ Id.VSub_DollarName '$test_cmp_a'))} {<Id.Lit_Equals '='>} 
                  {(DQ ($ Id.VSub_DollarName '$test_cmp_b'))}
                )
                (C {<eval>} 
                  {
                    (DQ <'diff -u '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                      (word_part.EscapedLiteral
                        token: <Id.Lit_EscapedChar '\\$'>
                      ) <'@'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' '> 
                      ($ Id.VSub_DollarName '$stdin_for_diff')
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: mingw_read_file_strip_cr_
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<line>})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: (condition.Shell commands:[(C {<Id.Lit_Colon ':'>})])
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Simple
                                  words: [
                                    {<read>}
                                    {<-r>}
                                    {<-d>}
                                    {
                                      (single_quoted
                                        left: <Id.Left_DollarSingleQuote '$\''>
                                        tokens: [<Id.Char_OneChar '\\n'>]
                                        multiline: F
                                      )
                                    }
                                    {<line>}
                                  ]
                                  more_env: [
                                    (env_pair
                                      name: IFS
                                      val: 
                                        {
                                          (single_quoted
                                            left: <Id.Left_DollarSingleQuote '$\''>
                                            tokens: [<Id.Char_OneChar '\\r'>]
                                            multiline: F
                                          )
                                        }
                                      spids: [4793]
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:line)
                                  op: assign_op.Equal
                                  rhs: 
                                    {($ Id.VSub_DollarName '$line') 
                                      (single_quoted
                                        left: <Id.Left_DollarSingleQuote '$\''>
                                        tokens: [<Id.Char_OneChar '\\n'>]
                                        multiline: F
                                      )
                                    }
                                  spids: [4818]
                                )
                              ]
                            )
                          ]
                          spids: [4791 4811]
                        )
                      ]
                      else_action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$line'))})]
                                )
                              action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)]
                              spids: [4840 4851]
                            )
                          ]
                        )
                      ]
                    )
                    (C {<eval>} 
                      {
                        (DQ ($ Id.VSub_Number '$1') <'='> 
                          (word_part.EscapedLiteral
                            token: <Id.Lit_EscapedChar '\\$'>
                          ) ($ Id.VSub_Number '$1') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <line>
                        )
                      }
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: test_env
      body: 
        (BraceGroup
          children: [
            (command.Subshell
              child: 
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>})]
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.Case
                          to_match: {(DQ ($ Id.VSub_Number '$1'))}
                          arms: [
                            (case_arm
                              pat_list: [{<Id.Lit_Star '*'> <Id.Lit_Equals '='> <Id.Lit_Star '*'>}]
                              action: [
                                (C {<eval>} 
                                  {
                                    (DQ 
                                      (braced_var_sub
                                        token: <Id.VSub_Number 1>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            tok: <Id.VOp1_DPercent '%%'>
                                            arg_word: {<'='> <Id.Lit_Other '*'>}
                                          )
                                      ) <'='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'{1#*=}'>
                                    )
                                  }
                                )
                                (C {<eval>} 
                                  {
                                    (DQ <'export '> 
                                      (braced_var_sub
                                        token: <Id.VSub_Number 1>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            tok: <Id.VOp1_DPercent '%%'>
                                            arg_word: {<'='> <Id.Lit_Other '*'>}
                                          )
                                      )
                                    )
                                  }
                                )
                                (C {<shift>})
                              ]
                              spids: [4927 4930 4964 -1]
                            )
                            (case_arm
                              pat_list: [{<Id.Lit_Star '*'>}]
                              action: [
                                (C {(DQ ($ Id.VSub_At '$@'))})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Exit exit>
                                )
                              ]
                              spids: [4967 4968 4979 -1]
                            )
                          ]
                        )
                      ]
                    )
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: test_match_signal
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_Equals '='>} 
                          {
                            (DQ 
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: {<Id.Lit_Digits 128>}
                                    right: {($ Id.VSub_Number '$1')}
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [5007 5029]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_Equals '='>} 
                          {
                            (DQ 
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: {<Id.Lit_Digits 256>}
                                    right: {($ Id.VSub_Number '$1')}
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [5041 5063]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: test_copy_bytes
      body: 
        (BraceGroup
          children: [
            (C {<perl>} {<-e>} 
              {
                (SQ <'\n'> <'\t\tmy $len = $ARGV[1];\n'> <'\t\twhile ($len > 0) {\n'> <'\t\t\tmy $s;\n'> 
                  <'\t\t\tmy $nread = sysread(STDIN, $s, $len);\n'> <'\t\t\tdie "cannot read: $!" unless defined($nread);\n'> <'\t\t\tprint $s;\n'> 
                  <'\t\t\t$len -= $nread;\n'> <'\t\t}\n'> <'\t'>
                )
              } {<->} {(DQ ($ Id.VSub_Number '$1'))}
            )
          ]
        )
    )
  ]
)