(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:CURRENT_DIR)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (AndOr
                          children: [
                            (C {(cd)} 
                              {
                                (DQ 
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (C {(dirname)} 
                                            {
                                              (DQ 
                                                (BracedVarSub
                                                  token: <VSub_Name BASH_SOURCE>
                                                  bracket_op: 
                                                    (ArrayIndex
                                                      expr: (ArithWord w:{(Lit_Digits 0)})
                                                    )
                                                  spids: [65 70]
                                                )
                                              )
                                            }
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub "$(">
                                    spids: [61 72]
                                  )
                                )
                              }
                            )
                            (C {(pwd)})
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [57 78]
                )
              )
            }
          spids: [55]
        )
      ]
      spids: [55]
    )
    (AndOr
      children: [
        (C {(source)} {(DQ (${ VSub_Name CURRENT_DIR) (/../integration_test_setup.sh))})
        (BraceGroup
          children: [
            (Sentence
              child: 
                (SimpleCommand
                  words: [{(echo)} {(DQ ("integration_test_setup.sh not found!"))}]
                  redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[102])]
                )
              terminator: <Op_Semi ";">
            )
            (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">)
          ]
          spids: [94]
        )
      ]
      op_id: Op_DPipe
    )
    (C {(set)} {(-e)})
    (FuncDef
      name: set_up
      body: 
        (BraceGroup
          children: [
            (C {(mkdir)} {(-p)} {(pkg)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(pkg/true.sh)} spids:[141])
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: {(DQ ("#!/bin/sh\n") ("exit 0\n"))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [145]
                )
              ]
            )
            (C {(chmod)} {(755)} {(pkg/true.sh)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(pkg/BUILD)} spids:[160])
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: 
                    {
                      (DQ ("sh_test(\n") ("  name = ") (Right_DoubleQuote "\"") (true) 
                        (Right_DoubleQuote "\"") (",\n") ("  srcs = [") (Right_DoubleQuote "\"") (true.sh) (Right_DoubleQuote "\"") ("],\n") (")\n")
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [164]
                )
              ]
            )
          ]
          spids: [129]
        )
      spids: [123 128]
    )
    (FuncDef
      name: test_basic_progress
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [
                    {(bazel)}
                    {(test)}
                    {(--curses) (Lit_Other "=") (yes)}
                    {(--color) (Lit_Other "=") (yes)}
                    {(pkg) (Lit_Other ":") (true)}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {($ VSub_Name "$TEST_log")}
                      spids: [211]
                    )
                  ]
                )
                (C {(fail)} {(DQ ("bazel test failed"))})
              ]
              op_id: Op_DPipe
            )
            (C {(expect_log)} {(SQ <"\\[[0-9,]* / [0-9,]*\\]">)})
            (C {(expect_log)} {(SQ <Lit_EscapedChar "\\x"> <1b> <Lit_EscapedChar "\\["> <32m>)})
            (C {(expect_log)} 
              {
                (SQ <Lit_EscapedChar "\\x"> <1b> <Lit_EscapedChar "\\["> <1A> <Lit_EscapedChar "\\x"> <1b> 
                  <Lit_EscapedChar "\\["> <K>
                )
              }
            )
          ]
          spids: [192]
        )
      spids: [186 191]
    )
    (FuncDef
      name: test_line_wrapping
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [
                    {(bazel)}
                    {(test)}
                    {(--curses) (Lit_Other "=") (yes)}
                    {(--color) (Lit_Other "=") (yes)}
                    {(--terminal_columns) (Lit_Other "=") (5)}
                    {(pkg) (Lit_Other ":") (true)}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {($ VSub_Name "$TEST_log")}
                      spids: [297]
                    )
                  ]
                )
                (C {(fail)} {(DQ ("bazel test failed"))})
              ]
              op_id: Op_DPipe
            )
            (C {(expect_log)} 
              {
                (SQ <Lit_EscapedChar "\\x"> <1b> <Lit_EscapedChar "\\["> <1A> <Lit_EscapedChar "\\x"> <1b> 
                  <Lit_EscapedChar "\\["> <K>
                )
              }
            )
            (C {(expect_log)} {(SQ <Lit_EscapedChar "\\x"> <1b> <Lit_EscapedChar "\\["> <32m>)})
            (C {(expect_log)} {(SQ <"\\\\">) (SQ <Lit_EscapedChar "\\r">) (SQ <"$">)})
          ]
          spids: [274]
        )
      spids: [268 273]
    )
    (FuncDef
      name: test_noline_wrapping_color_nocurses
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [
                    {(bazel)}
                    {(test)}
                    {(--curses) (Lit_Other "=") (no)}
                    {(--color) (Lit_Other "=") (yes)}
                    {(--terminal_columns) (Lit_Other "=") (5)}
                    {(pkg) (Lit_Other ":") (true)}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {($ VSub_Name "$TEST_log")}
                      spids: [389]
                    )
                  ]
                )
                (C {(fail)} {(DQ ("bazel test failed"))})
              ]
              op_id: Op_DPipe
            )
            (C {(expect_log)} {(SQ <Lit_EscapedChar "\\x"> <1b> <Lit_EscapedChar "\\["> <32m>)})
            (C {(expect_not_log)} {(SQ <Lit_EscapedChar "\\x"> <1b> <Lit_EscapedChar "\\["> <K>)})
            (C {(expect_not_log)} {(SQ <"\\\\">) (SQ <Lit_EscapedChar "\\r">)})
          ]
          spids: [366]
        )
      spids: [360 365]
    )
    (C {(run_suite)} {(DQ ("Basic integration tests for the standard UI"))})
  ]
)