(command.CommandList
  children: [
    (command.ShFunction
      name: h_pass
      body: 
        (BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:cmd)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [84]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<shift>})
            (C {<echo>} 
              {
                (DQ <'Running [atf-check '> ($ Id.VSub_Star '$*') <'] against ['> (${ Id.VSub_Name cmd) 
                  <']'>
                )
              }
            )
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<script.sh>}
                )
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.MultiLine
                      here_begin: {<EOF>}
                      here_end_span_id: 126
                      stdin_parts: [
                        <'#! '>
                        (${ Id.VSub_Name Atf_Shell)
                        <'\n'>
                        (${ Id.VSub_Name cmd)
                        <'\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<script.sh>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (command.Simple
                              words: [
                                {(${ Id.VSub_Name Atf_Check)}
                                {(DQ (${ Id.VSub_At '@'))}
                                {<'./script.sh'>}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<tmp>}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          negated: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<cat>} {<tmp>}) (C {<atf_fail>} {(DQ <'atf-check failed'>)})]
                  spids: [137 157]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: h_fail
      body: 
        (BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:cmd)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [184]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
            (C {<shift>})
            (C {<echo>} 
              {
                (DQ <'Running [atf-check '> ($ Id.VSub_Star '$*') <'] against ['> (${ Id.VSub_Name cmd) 
                  <']'>
                )
              }
            )
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<script.sh>}
                )
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.MultiLine
                      here_begin: {<EOF>}
                      here_end_span_id: 226
                      stdin_parts: [
                        <'#! '>
                        (${ Id.VSub_Name Atf_Shell)
                        <'\n'>
                        (${ Id.VSub_Name cmd)
                        <'\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<script.sh>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [
                            {(${ Id.VSub_Name Atf_Check)}
                            {(DQ (${ Id.VSub_At '@'))}
                            {<'./script.sh'>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<tmp>}
                            )
                          ]
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<cat>} {<tmp>})
                    (C {<atf_fail>} {(DQ <'atf-check succeeded but should fail'>)})
                  ]
                  spids: [237 255]
                )
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<sflag_eq_ne>})
    (command.ShFunction
      name: sflag_eq_ne_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -s option using the \'eq\' and \'ne\' qualifiers'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: sflag_eq_ne_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <true>)} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>})
            (C {<h_pass>} {(DQ <false>)} {<-s>} {<ne> <Id.Lit_Colon ':'> <0>})
            (C {<h_pass>} {(DQ <'exit 255'>)} {<-s>} {<eq> <Id.Lit_Colon ':'> <255>})
            (C {<h_pass>} {(DQ <'exit 0'>)} {<-s>} {<ne> <Id.Lit_Colon ':'> <255>})
            (C {<h_fail>} {(DQ <'exit 256'>)} {<-s>} {<eq> <Id.Lit_Colon ':'> <256>})
            (C {<h_fail>} {(DQ <'exit -1'>)} {<-s>} {<eq> <Id.Lit_Colon ':'> <-1>})
            (C {<h_fail>} {(DQ <true>)} {<-s>} {<ne> <Id.Lit_Colon ':'> <256>})
            (C {<h_fail>} {(DQ <true>)} {<-s>} {<ne> <Id.Lit_Colon ':'> <-1>})
          ]
        )
    )
    (C {<atf_test_case>} {<sflag_exit>})
    (command.ShFunction
      name: sflag_exit_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -s option using the \'exit\' qualifier'>)})
          ]
        )
    )
    (command.ShFunction
      name: sflag_exit_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(SQ <true>)} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>})
            (C {<h_pass>} {(SQ <false>)} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>})
            (C {<h_pass>} {(SQ <'exit 255'>)} {<-s>} 
              {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <255>}
            )
            (C {<h_pass>} {(SQ <'exit 0'>)} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <255>})
            (C {<h_fail>} {(SQ <'exit 256'>)} {<-s>} 
              {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <256>}
            )
            (C {<h_fail>} {(SQ <'exit -1'>)} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <-1>})
            (C {<h_fail>} {(SQ <true>)} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <256>})
            (C {<h_fail>} {(SQ <true>)} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <-1>})
            (C {<h_pass>} {(SQ <true>)} {<-s>} {<Id.ControlFlow_Exit exit>})
            (C {<h_pass>} {(SQ <false>)} {<-s>} {<Id.ControlFlow_Exit exit>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<Id.ControlFlow_Exit exit>} {<-x>} 
                          {(SQ <'kill $$'>)}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<atf_fail>} {(DQ <'Signal detected as clean exit'>)})]
                  spids: [570 587]
                )
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<sflag_ignore>})
    (command.ShFunction
      name: sflag_ignore_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -s option using the \'ignore\' qualifier'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: sflag_ignore_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(SQ <true>)} {<-s>} {<ignore>})
            (C {<h_pass>} {(SQ <false>)} {<-s>} {<ignore>})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<ignored>} {<-x>} {(SQ <'kill $$'>)})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<atf_fail>} {(DQ <'Signal not ignored'>)})]
                  spids: [654 671]
                )
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<sflag_signal>})
    (command.ShFunction
      name: sflag_signal_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -s option using the \'signal\' qualifier'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: sflag_signal_body
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<signal> <Id.Lit_Colon ':'> <hup>} {<-x>} 
                  {(SQ <'kill -1 $$'>)}
                )
                (C {<atf_fail>} {(DQ <'Signal not detected'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<signal> <Id.Lit_Colon ':'> <sighup>} {<-x>} 
                  {(SQ <'kill -1 $$'>)}
                )
                (C {<atf_fail>} {(DQ <'Signal not'>)} {(DQ <detected>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<signal> <Id.Lit_Colon ':'> <1>} {<-x>} 
                  {(SQ <'kill -1 $$'>)}
                )
                (C {<atf_fail>} {(DQ <'Signal not detected'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<signal>} {<-x>} {(SQ <'kill -1 $$'>)})
                (C {<atf_fail>} {(DQ <'Signal not detected'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<not-signal> <Id.Lit_Colon ':'> <kill>} {<-x>} 
                  {(SQ <'kill -9 $$'>)}
                )
                (C {<atf_fail>} {(DQ <'not-signal:kill matched kill -9'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<not-signal> <Id.Lit_Colon ':'> <kill>} {<-x>} 
                  {(SQ <'kill -1 $$'>)}
                )
                (C {<atf_fail>} {(DQ <'not-signal:kill did not match kill -1'>)})
              ]
            )
            (C {<h_fail>} {(SQ <true>)} {<-s>} {<signal>})
            (C {<h_fail>} {(SQ <false>)} {<-s>} {<signal>})
          ]
        )
    )
    (C {<atf_test_case>} {<xflag>})
    (command.ShFunction
      name: xflag_head
      body: (BraceGroup children:[(C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -x option'>)})])
    )
    (command.ShFunction
      name: xflag_body
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-s>} {<ne> <Id.Lit_Colon ':'> <0>} {<-o>} {<ignore>} 
                  {<-e>} {<ignore>} {(DQ <'echo foo 2>&1'>)}
                )
                (C {<atf_fail>} {(DQ <'Shell command succeeded without -x'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-e>} 
                  {<inline> <Id.Lit_Colon ':'> (DQ <foo> <Id.Lit_Other '\\'> <n>)} {<-x>} {(DQ <'echo foo 1>&2'>)}
                )
                (C {<atf_fail>} {(DQ <'Cannot run command with -x'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(${ Id.VSub_Name Atf_Check)} {<-o>} 
                  {<inline> <Id.Lit_Colon ':'> (DQ <foo> <Id.Lit_Other '\\'> <n>)} {<-x>} {<echo>} {<foo>}
                )
                (C {<atf_fail>} {(DQ <'Using -x does not respect all provided arguments'>)})
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_empty>})
    (command.ShFunction
      name: oflag_empty_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -o option using the \'empty\' argument'>)})
          ]
        )
    )
    (command.ShFunction
      name: oflag_empty_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <true>)} {<-o>} {<empty>})
            (C {<h_fail>} {(DQ <'echo foo'>)} {<-o>} {<empty>})
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_ignore>})
    (command.ShFunction
      name: oflag_ignore_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -o option using the \'ignore\' argument'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: oflag_ignore_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <true>)} {<-o>} {<ignore>})
            (C {<h_pass>} {(DQ <'echo foo'>)} {<-o>} {<ignore>})
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_file>})
    (command.ShFunction
      name: oflag_file_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -o option using the \'file:\' argument'>)})
          ]
        )
    )
    (command.ShFunction
      name: oflag_file_body
      body: 
        (BraceGroup
          children: [
            (C {<touch>} {<empty>})
            (C {<h_pass>} {(DQ <true>)} {<-o>} {<file> <Id.Lit_Colon ':'> <empty>})
            (command.Simple
              words: [{<echo>} {<foo>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<text>})]
              do_fork: T
            )
            (C {<h_pass>} {(DQ <'echo foo'>)} {<-o>} {<file> <Id.Lit_Colon ':'> <text>})
            (C {<h_fail>} {(DQ <'echo bar'>)} {<-o>} {<file> <Id.Lit_Colon ':'> <text>})
            (C {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/urandom'>} {<Id.Lit_VarLike 'of='> <bin>} 
              {<Id.Lit_VarLike 'bs='> <1k>} {<Id.Lit_VarLike 'count='> <10>}
            )
            (C {<h_pass>} {(DQ <'cat bin'>)} {<-o>} {<file> <Id.Lit_Colon ':'> <bin>})
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_inline>})
    (command.ShFunction
      name: oflag_inline_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -o option using the \'inline:\' argument'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: oflag_inline_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <true>)} {<-o>} {<inline> <Id.Lit_Colon ':'>})
            (C {<h_pass>} {(DQ <'echo foo bar'>)} {<-o>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'> <Id.Lit_Other '\\'> <n>)}
            )
            (C {<h_pass>} {(DQ <'printf \'foo bar\''>)} {<-o>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'>)}
            )
            (C {<h_pass>} 
              {
                (DQ <'printf \''> <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <t> 
                  <Id.Lit_Other '\\'> <'n\''>
                )
              } {<-o>} 
              {<inline> <Id.Lit_Colon ':'> 
                (DQ <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <t> 
                  <Id.Lit_Other '\\'> <n>
                )
              }
            )
            (C {<h_pass>} 
              {
                (DQ <'printf \''> <Id.Lit_Other '\\'> <a> <Id.Lit_Other '\\'> <b> <Id.Lit_Other '\\'> <033> 
                  <Id.Lit_Other '\\'> <f> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <r> <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <'v\''>
                )
              } {<-o>} 
              {<inline> <Id.Lit_Colon ':'> 
                (DQ <Id.Lit_Other '\\'> <a> <Id.Lit_Other '\\'> <b> <Id.Lit_Other '\\'> <e> 
                  <Id.Lit_Other '\\'> <f> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <r> <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <v>
                )
              }
            )
            (C {<h_pass>} 
              {
                (DQ <'printf \''> <Id.Lit_Other '\\'> <011> <Id.Lit_Other '\\'> <022> <Id.Lit_Other '\\'> 
                  <033> <Id.Lit_Other '\\'> <'012\''>
                )
              } {<-o>} 
              {<inline> <Id.Lit_Colon ':'> 
                (DQ <Id.Lit_Other '\\'> <011> <Id.Lit_Other '\\'> <022> <Id.Lit_Other '\\'> <033> 
                  <Id.Lit_Other '\\'> <012>
                )
              }
            )
            (C {<h_fail>} {(DQ <'echo foo bar'>)} {<-o>} {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'>)})
            (C {<h_fail>} {(DQ <'echo -n foo bar'>)} {<-o>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'> <Id.Lit_Other '\\'> <n>)}
            )
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_match>})
    (command.ShFunction
      name: oflag_match_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -o option using the \'match:\' argument'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: oflag_match_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'printf no-newline'>)} {<-o>} {(DQ <'match:^no-newline'>)})
            (C {<h_pass>} {(DQ <'echo line1; echo foo bar'>)} {<-o>} {(DQ <'match:^foo'>)})
            (C {<h_pass>} {(DQ <'echo foo bar'>)} {<-o>} {(DQ <'match:o b'>)})
            (C {<h_fail>} {(DQ <'echo foo bar'>)} {<-o>} {(DQ <'match:baz'>)})
            (C {<h_fail>} {(DQ <'echo foo bar'>)} {<-o>} {(DQ <'match:^bar'>)})
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_save>})
    (command.ShFunction
      name: oflag_save_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -o option using the \'save:\' argument'>)})
          ]
        )
    )
    (command.ShFunction
      name: oflag_save_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'echo foo'>)} {<-o>} {<save> <Id.Lit_Colon ':'> <out>})
            (command.Simple
              words: [{<echo>} {<foo>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<exp>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cmp>} {<-s>} {<out>} {<exp>})
                (C {<atf_fail>} {(DQ <'Saved output does not match expected results'>)})
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_multiple>})
    (command.ShFunction
      name: oflag_multiple_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for multiple occurrences of the -o option'>)})
          ]
        )
    )
    (command.ShFunction
      name: oflag_multiple_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'echo foo bar'>)} {<-o>} {<match> <Id.Lit_Colon ':'> <foo>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> <bar>}
            )
            (C {<h_pass>} {(DQ <'echo foo; echo bar'>)} {<-o>} {<match> <Id.Lit_Colon ':'> <foo>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> <bar>}
            )
            (C {<h_fail>} {(DQ <'echo foo baz'>)} {<-o>} {<match> <Id.Lit_Colon ':'> <bar>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> <foo>}
            )
            (C {<h_fail>} {(DQ <'echo foo; echo baz'>)} {<-o>} {<match> <Id.Lit_Colon ':'> <bar>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> <foo>}
            )
          ]
        )
    )
    (C {<atf_test_case>} {<oflag_negated>})
    (command.ShFunction
      name: oflag_negated_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for negated occurrences of the -o option'>)})
          ]
        )
    )
    (command.ShFunction
      name: oflag_negated_body
      body: 
        (BraceGroup
          children: [
            (C {<h_fail>} {(DQ <'echo foo'>)} {<-o>} {<empty>})
            (C {<h_pass>} {(DQ <'echo foo'>)} {<-o>} {<not-empty>})
            (C {<h_pass>} {(DQ <'echo foo bar'>)} {<-o>} {<match> <Id.Lit_Colon ':'> <foo>})
            (C {<h_fail>} {(DQ <'echo foo bar'>)} {<-o>} {<not-match> <Id.Lit_Colon ':'> <foo>})
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_empty>})
    (command.ShFunction
      name: eflag_empty_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -e option using the \'empty\' argument'>)})
          ]
        )
    )
    (command.ShFunction
      name: eflag_empty_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'true 1>&2'>)} {<-e>} {<empty>})
            (C {<h_fail>} {(DQ <'echo foo 1>&2'>)} {<-e>} {<empty>})
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_ignore>})
    (command.ShFunction
      name: eflag_ignore_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -e option using the \'ignore\' argument'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: eflag_ignore_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'true 1>&2'>)} {<-e>} {<ignore>})
            (C {<h_pass>} {(DQ <'echo foo 1>&2'>)} {<-e>} {<ignore>})
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_file>})
    (command.ShFunction
      name: eflag_file_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -e option using the \'file:\' argument'>)})
          ]
        )
    )
    (command.ShFunction
      name: eflag_file_body
      body: 
        (BraceGroup
          children: [
            (C {<touch>} {<empty>})
            (C {<h_pass>} {(DQ <'true 1>&2'>)} {<-e>} {<file> <Id.Lit_Colon ':'> <empty>})
            (command.Simple
              words: [{<echo>} {<foo>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<text>})]
              do_fork: T
            )
            (C {<h_pass>} {(DQ <'echo foo 1>&2'>)} {<-e>} {<file> <Id.Lit_Colon ':'> <text>})
            (C {<h_fail>} {(DQ <'echo bar 1>&2'>)} {<-e>} {<file> <Id.Lit_Colon ':'> <text>})
            (C {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/urandom'>} {<Id.Lit_VarLike 'of='> <bin>} 
              {<Id.Lit_VarLike 'bs='> <1k>} {<Id.Lit_VarLike 'count='> <10>}
            )
            (C {<h_pass>} {(DQ <'cat bin 1>&2'>)} {<-e>} {<file> <Id.Lit_Colon ':'> <bin>})
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_inline>})
    (command.ShFunction
      name: eflag_inline_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -e option using the \'inline:\' argument'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: eflag_inline_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'true 1>&2'>)} {<-e>} {<inline> <Id.Lit_Colon ':'>})
            (C {<h_pass>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'> <Id.Lit_Other '\\'> <n>)}
            )
            (C {<h_pass>} {(DQ <'printf \'foo bar\' 1>&2'>)} {<-e>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'>)}
            )
            (C {<h_pass>} 
              {
                (DQ <'printf \''> <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <t> 
                  <Id.Lit_Other '\\'> <'n\' 1>&2'>
                )
              } {<-e>} 
              {<inline> <Id.Lit_Colon ':'> 
                (DQ <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <t> 
                  <Id.Lit_Other '\\'> <n>
                )
              }
            )
            (C {<h_pass>} 
              {
                (DQ <'printf \''> <Id.Lit_Other '\\'> <a> <Id.Lit_Other '\\'> <b> <Id.Lit_Other '\\'> <033> 
                  <Id.Lit_Other '\\'> <f> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <r> <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <'v\' 1>&2'>
                )
              } {<-e>} 
              {<inline> <Id.Lit_Colon ':'> 
                (DQ <Id.Lit_Other '\\'> <a> <Id.Lit_Other '\\'> <b> <Id.Lit_Other '\\'> <e> 
                  <Id.Lit_Other '\\'> <f> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <r> <Id.Lit_Other '\\'> <t> <Id.Lit_Other '\\'> <v>
                )
              }
            )
            (C {<h_pass>} 
              {
                (DQ <'printf \''> <Id.Lit_Other '\\'> <011> <Id.Lit_Other '\\'> <022> <Id.Lit_Other '\\'> 
                  <033> <Id.Lit_Other '\\'> <'012\' 1>&2'>
                )
              } {<-e>} 
              {<inline> <Id.Lit_Colon ':'> 
                (DQ <Id.Lit_Other '\\'> <011> <Id.Lit_Other '\\'> <022> <Id.Lit_Other '\\'> <033> 
                  <Id.Lit_Other '\\'> <012>
                )
              }
            )
            (C {<h_fail>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'>)}
            )
            (C {<h_fail>} {(DQ <'echo -n foo bar 1>&2'>)} {<-e>} 
              {<inline> <Id.Lit_Colon ':'> (DQ <'foo bar'> <Id.Lit_Other '\\'> <n>)}
            )
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_save>})
    (command.ShFunction
      name: eflag_save_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for the -e option using the \'save:\' argument'>)})
          ]
        )
    )
    (command.ShFunction
      name: eflag_save_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'echo foo 1>&2'>)} {<-e>} {<save> <Id.Lit_Colon ':'> <out>})
            (command.Simple
              words: [{<echo>} {<foo>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<exp>})]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cmp>} {<-s>} {<out>} {<exp>})
                (C {<atf_fail>} {(DQ <'Saved output does not match expected results'>)})
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_match>})
    (command.ShFunction
      name: eflag_match_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} 
              {(DQ <'Tests for the -e option using the \'match:\' argument'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: eflag_match_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'printf no-newline 1>&2'>)} {<-e>} {(DQ <'match:^no-newline'>)})
            (C {<h_pass>} {(DQ <'echo line1 1>&2; echo foo bar 1>&2'>)} {<-e>} {(DQ <'match:^foo'>)})
            (C {<h_pass>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} {(DQ <'match:o b'>)})
            (C {<h_fail>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} {(DQ <'match:baz'>)})
            (C {<h_fail>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} {(DQ <'match:^bar'>)})
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_multiple>})
    (command.ShFunction
      name: eflag_multiple_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for multiple occurrences of the -e option'>)})
          ]
        )
    )
    (command.ShFunction
      name: eflag_multiple_body
      body: 
        (BraceGroup
          children: [
            (C {<h_pass>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} {<match> <Id.Lit_Colon ':'> <foo>} {<-e>} 
              {<match> <Id.Lit_Colon ':'> <bar>}
            )
            (C {<h_pass>} {(DQ <'echo foo 1>&2; echo bar 1>&2'>)} {<-e>} 
              {<match> <Id.Lit_Colon ':'> <foo>} {<-e>} {<match> <Id.Lit_Colon ':'> <bar>}
            )
            (C {<h_fail>} {(DQ <'echo foo baz 1>&2'>)} {<-e>} {<match> <Id.Lit_Colon ':'> <bar>} {<-e>} 
              {<match> <Id.Lit_Colon ':'> <foo>}
            )
            (C {<h_fail>} {(DQ <'echo foo 1>&2; echo baz 1>&2'>)} {<-e>} 
              {<match> <Id.Lit_Colon ':'> <bar>} {<-e>} {<match> <Id.Lit_Colon ':'> <foo>}
            )
          ]
        )
    )
    (C {<atf_test_case>} {<eflag_negated>})
    (command.ShFunction
      name: eflag_negated_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for negated occurrences of the -e option'>)})
          ]
        )
    )
    (command.ShFunction
      name: eflag_negated_body
      body: 
        (BraceGroup
          children: [
            (C {<h_fail>} {(DQ <'echo foo 1>&2'>)} {<-e>} {<empty>})
            (C {<h_pass>} {(DQ <'echo foo 1>&2'>)} {<-e>} {<not-empty>})
            (C {<h_pass>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} {<match> <Id.Lit_Colon ':'> <foo>})
            (C {<h_fail>} {(DQ <'echo foo bar 1>&2'>)} {<-e>} {<not-match> <Id.Lit_Colon ':'> <foo>})
          ]
        )
    )
    (C {<atf_test_case>} {<stdin>})
    (command.ShFunction
      name: stdin_head
      body: 
        (BraceGroup
          children: [(C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that stdin is preserved'>)})]
        )
    )
    (command.ShFunction
      name: stdin_body
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Pipeline
                  children: [
                    (C {<echo>} {(DQ <hello>)})
                    (C {(${ Id.VSub_Name Atf_Check)} {<-o>} {<match> <Id.Lit_Colon ':'> (DQ <hello>)} 
                      {<cat>}
                    )
                  ]
                  negated: F
                )
                (C {<atf_fail>} {(DQ <'atf-check does not seem to respect stdin'>)})
              ]
            )
          ]
        )
    )
    (C {<atf_test_case>} {<invalid_umask>})
    (command.ShFunction
      name: invalid_umask_head
      body: 
        (BraceGroup
          children: [
            (C {<atf_set>} {(DQ <descr>)} {(DQ <'Tests for a correct error condition if the umask is'>)} 
              {(DQ <'too restrictive'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: invalid_umask_body
      body: 
        (BraceGroup
          children: [
            (C {<umask>} {<0222>})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [{(${ Id.VSub_Name Atf_Check)} {<false>}]
                  redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<stderr>})]
                  do_fork: T
                )
                (C {<atf_fail>} {(DQ <'atf-check returned 0 but it should have failed'>)})
              ]
            )
            (C {<cat>} {<stderr>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{<grep>} {(SQ <'temporary.*current umask.*0222'>)} {<stderr>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (C {<atf_fail>} {(DQ <'atf-check did not report an error related to the'>)} 
                  {(DQ <'current umask'>)}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: atf_init_test_cases
      body: 
        (BraceGroup
          children: [
            (C {<atf_add_test_case>} {<sflag_eq_ne>})
            (C {<atf_add_test_case>} {<sflag_exit>})
            (C {<atf_add_test_case>} {<sflag_ignore>})
            (C {<atf_add_test_case>} {<sflag_signal>})
            (C {<atf_add_test_case>} {<xflag>})
            (C {<atf_add_test_case>} {<oflag_empty>})
            (C {<atf_add_test_case>} {<oflag_ignore>})
            (C {<atf_add_test_case>} {<oflag_file>})
            (C {<atf_add_test_case>} {<oflag_inline>})
            (C {<atf_add_test_case>} {<oflag_match>})
            (C {<atf_add_test_case>} {<oflag_save>})
            (C {<atf_add_test_case>} {<oflag_multiple>})
            (C {<atf_add_test_case>} {<oflag_negated>})
            (C {<atf_add_test_case>} {<eflag_empty>})
            (C {<atf_add_test_case>} {<eflag_ignore>})
            (C {<atf_add_test_case>} {<eflag_file>})
            (C {<atf_add_test_case>} {<eflag_inline>})
            (C {<atf_add_test_case>} {<eflag_match>})
            (C {<atf_add_test_case>} {<eflag_save>})
            (C {<atf_add_test_case>} {<eflag_multiple>})
            (C {<atf_add_test_case>} {<eflag_negated>})
            (C {<atf_add_test_case>} {<stdin>})
            (C {<atf_add_test_case>} {<invalid_umask>})
          ]
        )
    )
  ]
)