(command.CommandList
  children: [
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C {<.>} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name srcdir>
                    suffix_op: (suffix_op.Unary tok:<Id.VTest_Equals '='> arg_word:{<.>})
                  ) <'/tests/init.sh'>
                )
              }
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<path_prepend_>} {<'./src'>})
      ]
    )
    (C {<print_ver_>} {<mv>})
    (command.AndOr ops:[Id.Op_DPipe] children:[(C {<mkdir>} {<foo>}) (C {<framework_failure_>})])
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<mv>} {<'foo/'>} {<bar>})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:fail)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [92]
            )
          ]
        )
      ]
    )
    (command.ForEach
      iter_name: cmd
      iter_words: [{<mv>} {(SQ <'cp -r'>)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ForEach
              iter_name: opt
              iter_words: [{(SQ )} {<-T>} {<-u>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [(C {<rm>} {<-rf>} {<d>} {<e>}) (C {<framework_failure_>})]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [(C {<mkdir>} {<d>}) (C {<framework_failure_>})]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {($ Id.VSub_DollarName '$cmd')} {($ Id.VSub_DollarName '$opt')} {<d>} {<'e/'>})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:fail)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [165]
                            )
                          ]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<test>} {(DQ ($ Id.VSub_DollarName '$cmd'))} 
                                      {<Id.Lit_Equals '='>} {<mv>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<test>} {<-d>} {<d>})
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:fail)
                                      op: assign_op.Equal
                                      rhs: {<1>}
                                      spids: [193]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                          spids: [169 182]
                        )
                      ]
                      else_action: [
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {<test>} {<-d>} {<d>})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:fail)
                                  op: assign_op.Equal
                                  rhs: {<1>}
                                  spids: [208]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<test>} {<-d>} {<e>})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:fail)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [223]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.Simple
      words: [
        {<printf>}
        {(SQ <'%s\\n'>)}
        {(DQ <'cp: cannot create regular file \'no-such/\': Not a directory'>)}
      ]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected-err>})]
      do_fork: T
    )
    (C {<touch>} {<b>})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Simple
          words: [{<cp>} {<b>} {<'no-such/'>}]
          redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<err>})]
          do_fork: T
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:fail)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [287]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Simple
          words: [{<sed>} {(SQ <'s/No such file or directory/Not a directory/'>)} {<err>}]
          redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<k>})]
          do_fork: T
        )
        (C {<mv>} {<k>} {<err>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<compare>} {<expected-err>} {<err>})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:fail)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [323]
            )
          ]
        )
      ]
    )
    (C {<Exit>} {($ Id.VSub_DollarName '$fail')})
  ]
)