(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Colon ':'>
      more_env: []
      words: [
        {<Id.Lit_Colon ':'>}
        {
          (BracedVarSub
            left: <Id.Left_DollarBrace '${'>
            token: <Id.VSub_Name TEST_SH>
            var_name: TEST_SH
            suffix_op: (suffix_op.Unary op:<Id.VTest_ColonEquals _> arg_word:{(DQ <'/bin/sh'>)})
            right: <Id.Right_DollarBrace '}'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<background>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <background_head>
      name: background_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {
                  (DQ <'Tests that sh(1) sets \''> ($ Id.VSub_QMark '?') <'\' properly when running '>)
                }
                {(DQ <'a command in the background (PR bin/46327)'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <background_body>
      name: background_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <0>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {(SQ <'true; true & echo $?'>)}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <0>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {(SQ <'false; true & echo $?'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<Id.KW_Function function>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <function_head>
      name: function_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {
                  (DQ <'Tests that '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'? is correctly updated inside '>
                  )
                }
                {(DQ <'a function'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <function_body>
      name: function_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-s>}
                {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <Id.Lit_VarLike 'STATUS='> <1-0>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {
                  (SQ <'\n'> <'\t\t\tcrud() {\n'> <'\t\t\t\ttest yes = no\n'> <'\n'> 
                    <'\t\t\t\tcat <<-EOF\n'> <'\t\t\t\tSTATUS=$?\n'> <'\t\t\t\tEOF\n'> <'\t\t\t}\n'> <'\t\t\tfoo=$(crud)\n'> 
                    <'\t\t\techo "${foo}-$?"\n'> <'\t\t'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<readout>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <readout_head>
      name: readout_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {
                  (DQ <'Tests that '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'? is correctly updated in a '>
                  )
                }
                {(DQ <'compound expression'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <readout_body>
      name: readout_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-s>}
                {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <0>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {(SQ <'true && ! true | false; echo $?'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<trap_subshell>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <trap_subshell_head>
      name: trap_subshell_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {(DQ <'Tests that the trap statement in a subshell '>)}
                {(DQ <'works when the subshell exits'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <trap_subshell_body>
      name: trap_subshell_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-s>}
                {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>}
                {<-o>}
                {<inline> <Id.Lit_Colon ':'> (SQ <'exiting\\n'>)}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {(SQ <'( trap "echo exiting" EXIT; /usr/bin/true )'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<trap_zero__implicit_exit>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <trap_zero__implicit_exit_head>
      name: trap_zero__implicit_exit_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {(DQ <'Tests that the trap statement in a subshell in a '>)}
                {(DQ <'script works when the subshell simply runs out of commands'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <trap_zero__implicit_exit_body>
      name: trap_zero__implicit_exit_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(SQ <'( trap "echo exiting" 0 )'>)}]
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<helper.sh>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-s>}
                {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <exiting>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<helper.sh>}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<trap_zero__explicit_exit>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <trap_zero__explicit_exit_head>
      name: trap_zero__explicit_exit_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {(DQ <'Tests that the trap statement in a subshell in a '>)}
                {(DQ <'script works when the subshell executes an explicit exit'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <trap_zero__explicit_exit_body>
      name: trap_zero__explicit_exit_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(SQ <'( trap "echo exiting" 0; exit; echo NO_NO_NO )'>)}]
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<helper.sh>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-s>}
                {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <exiting>}
                {<-o>}
                {<not-match> <Id.Lit_Colon ':'> <NO_NO>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<helper.sh>}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<simple_exit>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <simple_exit_head>
      name: simple_exit_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {(DQ <'Tests that various values for exit status work'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <simple_exit_body>
      name: simple_exit_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [N]
              iterable: 
                (for_iter.Words
                  words: [
                    {<0>}
                    {<1>}
                    {<2>}
                    {<3>}
                    {<4>}
                    {<5>}
                    {<6>}
                    {<42>}
                    {<99>}
                    {<101>}
                    {<125>}
                    {<126>}
                    {<127>}
                    {<128>}
                    {<129>}
                    {<200>}
                    {<254>}
                    {<255>}
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <atf_check>
                      more_env: []
                      words: [
                        {<atf_check>}
                        {<-s>}
                        {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName N)}
                        {<-o>}
                        {<empty>}
                        {<-e>}
                        {<empty>}
                        {(${ Id.VSub_Name TEST_SH)}
                        {<-c>}
                        {(DQ <'exit '> ($ Id.VSub_DollarName N) <'; echo FOO; echo BAR >&2'>)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<subshell_exit>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <subshell_exit_head>
      name: subshell_exit_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {
                  (DQ <'Tests that subshell exit status works and '> 
                    (word_part.EscapedLiteral
                      token: <Id.Lit_EscapedChar '\\$'>
                      ch: '$'
                    ) <'? gets it'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <subshell_exit_body>
      name: subshell_exit_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [N]
              iterable: 
                (for_iter.Words
                  words: [
                    {<0>}
                    {<1>}
                    {<2>}
                    {<3>}
                    {<4>}
                    {<5>}
                    {<6>}
                    {<42>}
                    {<99>}
                    {<101>}
                    {<125>}
                    {<126>}
                    {<127>}
                    {<128>}
                    {<129>}
                    {<200>}
                    {<254>}
                    {<255>}
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.Simple
                      blame_tok: <atf_check>
                      more_env: []
                      words: [
                        {<atf_check>}
                        {<-s>}
                        {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>}
                        {<-o>}
                        {<empty>}
                        {<-e>}
                        {<empty>}
                        {(${ Id.VSub_Name TEST_SH)}
                        {<-c>}
                        {
                          (DQ <'(exit '> ($ Id.VSub_DollarName N) <'); test '> 
                            (word_part.EscapedLiteral
                              token: <Id.Lit_EscapedChar '\\$'>
                              ch: '$'
                            ) <'? -eq '> ($ Id.VSub_DollarName N)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <atf_test_case>
      more_env: []
      words: [{<atf_test_case>} {<subshell_background>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <subshell_background_head>
      name: subshell_background_head
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_set>
              more_env: []
              words: [
                {<atf_set>}
                {(DQ <descr>)}
                {
                  (DQ <'Tests that sh(1) sets \''> ($ Id.VSub_QMark '?') <'\' properly when running '>)
                }
                {(DQ <'a subshell in the background'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <subshell_background_body>
      name: subshell_background_body
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <0>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {(SQ <'true; (false || true) & echo $?'>)}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_check>
              more_env: []
              words: [
                {<atf_check>}
                {<-o>}
                {<match> <Id.Lit_Colon ':'> <0>}
                {<-e>}
                {<empty>}
                {(${ Id.VSub_Name TEST_SH)}
                {<-c>}
                {(SQ <'false; (false || true) & echo $?'>)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <atf_init_test_cases>
      name: atf_init_test_cases
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<background>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<Id.KW_Function function>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<readout>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<trap_subshell>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<trap_zero__implicit_exit>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<trap_zero__explicit_exit>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<simple_exit>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<subshell_exit>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <atf_add_test_case>
              more_env: []
              words: [{<atf_add_test_case>} {<subshell_background>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
  ]
)