(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:expectedF)
          op: Equal
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Name TMPDIR>
                  suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)})
                  spids: [48 53]
                ) (/expected)
              )
            }
          spids: [46]
        )
      ]
      spids: [46]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:returnF)
          op: Equal
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Name TMPDIR>
                  suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)})
                  spids: [59 64]
                ) (/return)
              )
            }
          spids: [57]
        )
      ]
      spids: [57]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:stdoutF)
          op: Equal
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Name TMPDIR>
                  suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)})
                  spids: [70 75]
                ) (/STDOUT)
              )
            }
          spids: [68]
        )
      ]
      spids: [68]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:stderrF)
          op: Equal
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Name TMPDIR>
                  suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)})
                  spids: [81 86]
                ) (/STDERR)
              )
            }
          spids: [79]
        )
      ]
      spids: [79]
    )
    (C {(.)} {(./shflags_test_helpers)})
    (FuncDef
      name: testHelp
      body: 
        (BraceGroup
          children: [
            (C {(_testHelp)} {(SQ <-h>)})
            (AndOr
              children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)]
              op_id: Op_DPipe
            )
            (C {(_testHelp)} {(SQ <--help>)})
          ]
          spids: [103]
        )
      spids: [99 102]
    )
    (FuncDef
      name: _testHelp
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:flag)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [136]
                )
              ]
              spids: [136]
            )
            (C {(th_clearReturn)})
            (Subshell
              child: 
                (CommandList
                  children: [
                    (SimpleCommand
                      words: [{(FLAGS)} {(DQ (${ VSub_Name flag))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name stdoutF))}
                          spids: [159]
                        )
                        (Redir
                          op_id: Redir_Great
                          fd: 2
                          arg_word: {(DQ (${ VSub_Name stderrF))}
                          spids: [166]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [{(echo)} {($ VSub_QMark '$?')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name returnF))}
                          spids: [178]
                        )
                      ]
                    )
                  ]
                )
              spids: [148 186]
            )
            (C {(assertFalse)} {(SQ <'short help request should have returned a false exit code.'>)} 
              {
                (DQ 
                  (CommandSubPart
                    command_list: (CommandList children:[(C {(th_queryReturn)})])
                    left_token: <Left_CommandSub '$('>
                    spids: [200 202]
                  )
                )
              }
            )
            (SimpleCommand
              words: [{(grep)} {(SQ <'show this help'>)} {(DQ (${ VSub_Name stderrF))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[218])]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:grepped)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [222]
                )
              ]
              spids: [222]
            )
            (C {(assertTrue)} {(SQ <'short request for help should have produced some help output.'>)} 
              {(${ VSub_Name grepped)}
            )
            (AndOr
              children: [
                (C {(Lit_Other '[')} {(${ VSub_Name grepped)} {(-ne)} {(DQ (${ VSub_Name FLAGS_TRUE))} 
                  {(Lit_Other ']')}
                )
                (C {(th_showOutput)})
              ]
              op_id: Op_DAmp
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:FLAGS_HELP)
                          op: Equal
                          rhs: {(SQ <'this is a test'>)}
                          spids: [270]
                        )
                      ]
                      spids: [270]
                    )
                    (SimpleCommand
                      words: [{(FLAGS)} {(DQ (${ VSub_Name flag))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name stdoutF))}
                          spids: [284]
                        )
                        (Redir
                          op_id: Redir_Great
                          fd: 2
                          arg_word: {(DQ (${ VSub_Name stderrF))}
                          spids: [291]
                        )
                      ]
                    )
                  ]
                )
              spids: [267 299]
            )
            (SimpleCommand
              words: [{(grep)} {(SQ <'this is a test'>)} {(DQ (${ VSub_Name stderrF))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[314])]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:grepped)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [318]
                )
              ]
              spids: [318]
            )
            (C {(assertTrue)} {(SQ <'setting FLAGS_HELP did not produce expected result'>)} 
              {(${ VSub_Name grepped)}
            )
            (AndOr
              children: [
                (C {(Lit_Other '[')} {(${ VSub_Name grepped)} {(-ne)} {(DQ (${ VSub_Name FLAGS_TRUE))} 
                  {(Lit_Other ']')}
                )
                (C {(th_showOutput)})
              ]
              op_id: Op_DAmp
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (C {(DEFINE_boolean)} {(b)} {(false)} {(DQ ("help string containing a ' char"))} {(b)})
                    (SimpleCommand
                      words: [{(FLAGS)} {(DQ (${ VSub_Name flag))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name stdoutF))}
                          spids: [383]
                        )
                        (Redir
                          op_id: Redir_Great
                          fd: 2
                          arg_word: {(DQ (${ VSub_Name stderrF))}
                          spids: [390]
                        )
                      ]
                    )
                  ]
                )
              spids: [359 398]
            )
            (SimpleCommand
              words: [{(grep)} {(DQ ("help string containing a ' char"))} {(DQ (${ VSub_Name stderrF))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[413])]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:grepped)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [417]
                )
              ]
              spids: [417]
            )
            (C {(assertTrue)} {(DQ ("help strings containing apostrophes don't work"))} 
              {(${ VSub_Name grepped)}
            )
            (AndOr
              children: [
                (C {(Lit_Other '[')} {(${ VSub_Name grepped)} {(-ne)} {(DQ (${ VSub_Name FLAGS_TRUE))} 
                  {(Lit_Other ']')}
                )
                (C {(th_showOutput)})
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [133]
        )
      spids: [129 132]
    )
    (FuncDef
      name: mock_flags_columns
      body: (BraceGroup children:[(C {(echo)} {(80)})] spids:[459])
      spids: [455 458]
    )
    (FuncDef
      name: _doDefines
      body: 
        (BraceGroup
          children: [(C {(DEFINE_boolean)} {(SQ <force>)} {(false)} {(SQ )} {(f)})]
          spids: [473]
        )
      spids: [469 472]
    )
    (FuncDef
      name: testStandardHelpOutput
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [(C {(flags_getoptIsStd)}) (C {(startSkipping)})]
              op_id: Op_DPipe
            )
            (C {(_doDefines)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:help)
                  op: Equal
                  rhs: {(SQ <'USAGE: standard [flags] args'>)}
                  spids: [510]
                )
              ]
              spids: [510]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name expectedF))}
                  spids: [519]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ (${ VSub_Name help) ('\n') ('flags:\n') ('  -f  (default: false)\n') 
                        ('  -h  show this help (default: false)\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [526]
                )
              ]
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (FuncDef
                      name: _flags_columns
                      body: 
                        (BraceGroup
                          children: [
                            (Sentence
                              child: (C {(mock_flags_columns)})
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          spids: [545]
                        )
                      spids: [541 544]
                    )
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:FLAGS_HELP)
                              op: Equal
                              rhs: {(${ VSub_Name help)}
                              spids: [553]
                            )
                          ]
                          spids: [553]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (SimpleCommand
                      words: [{(FLAGS)} {(-h)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name stdoutF))}
                          spids: [564]
                        )
                        (Redir
                          op_id: Redir_Great
                          fd: 2
                          arg_word: {(DQ (${ VSub_Name stderrF))}
                          spids: [571]
                        )
                      ]
                    )
                  ]
                )
              spids: [538 579]
            )
            (SimpleCommand
              words: [{(diff)} {(DQ (${ VSub_Name expectedF))} {(DQ (${ VSub_Name stderrF))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[596])]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:r3turn)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [600]
                )
              ]
              spids: [600]
            )
            (C {(assertTrue)} {(SQ <'unexpected help output'>)} {(${ VSub_Name r3turn)})
            (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} 
              {(DQ (${ VSub_Name stderrF))}
            )
          ]
          spids: [496]
        )
      spids: [492 495]
    )
    (FuncDef
      name: testEnhancedHelpOutput
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [(C {(flags_getoptIsEnh)}) (C {(startSkipping)})]
              op_id: Op_DPipe
            )
            (C {(_doDefines)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:help)
                  op: Equal
                  rhs: {(SQ <'USAGE: enhanced [flags] args'>)}
                  spids: [654]
                )
              ]
              spids: [654]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name expectedF))}
                  spids: [663]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ (${ VSub_Name help) ('\n') ('flags:\n') 
                        ('  -f,--[no]force:  (default: false)\n') ('  -h,--help:  show this help (default: false)\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [670]
                )
              ]
            )
            (Subshell
              child: 
                (CommandList
                  children: [
                    (FuncDef
                      name: _flags_columns
                      body: 
                        (BraceGroup
                          children: [
                            (Sentence
                              child: (C {(mock_flags_columns)})
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          spids: [689]
                        )
                      spids: [685 688]
                    )
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:FLAGS_HELP)
                              op: Equal
                              rhs: {(${ VSub_Name help)}
                              spids: [701]
                            )
                          ]
                          spids: [701]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (SimpleCommand
                      words: [{(FLAGS)} {(-h)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name stdoutF))}
                          spids: [712]
                        )
                        (Redir
                          op_id: Redir_Great
                          fd: 2
                          arg_word: {(DQ (${ VSub_Name stderrF))}
                          spids: [719]
                        )
                      ]
                    )
                  ]
                )
              spids: [682 727]
            )
            (SimpleCommand
              words: [{(diff)} {(DQ (${ VSub_Name expectedF))} {(DQ (${ VSub_Name stderrF))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[744])]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:differed)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [748]
                )
              ]
              spids: [748]
            )
            (C {(assertTrue)} {(SQ <'unexpected help output'>)} {(${ VSub_Name differed)})
            (C {(th_showOutput)} {(${ VSub_Name differed)} {(DQ (${ VSub_Name stdoutF))} 
              {(DQ (${ VSub_Name stderrF))}
            )
          ]
          spids: [640]
        )
      spids: [636 639]
    )
    (FuncDef
      name: oneTimeSetUp
      body: 
        (BraceGroup
          children: [
            (C {(th_oneTimeSetUp)})
            (If
              arms: [
                (if_arm
                  cond: [(Sentence child:(C {(flags_getoptIsStd)}) terminator:<Op_Semi ';'>)]
                  action: [
                    (C {(th_warn)} 
                      {(SQ <'Standard version of getopt found. Enhanced tests will be skipped.'>)}
                    )
                    (ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [16777215 800]
                )
              ]
              spids: [16777215 813]
            )
            (C {(th_warn)} {(SQ <'Enhanced version of getopt found. Standard tests will be skipped.'>)})
          ]
          spids: [788]
        )
      spids: [784 787]
    )
    (FuncDef
      name: setUp
      body: (BraceGroup children:[(C {(flags_reset)})] spids:[829])
      spids: [825 828]
    )
    (AndOr
      children: [
        (C {(Lit_Other '[')} {(-n)} 
          {
            (DQ 
              (BracedVarSub
                token: <VSub_Name ZSH_VERSION>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                spids: [848 851]
              )
            )
          } {(Lit_Other ']')}
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:SHUNIT_PARENT)
              op: Equal
              rhs: {($ VSub_Number '$0')}
              spids: [858]
            )
          ]
          spids: [858]
        )
      ]
      op_id: Op_DAmp
    )
    (C {(.)} {(DQ (${ VSub_Name TH_SHUNIT))})
  ]
)