(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/xxxxxxxxxxxxxxxxxxxxxxxxxtrue.sh)}
                  spids: [145]
                )
                (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: [149]
                )
              ]
            )
            (C {(chmod)} {(755)} {(pkg/xxxxxxxxxxxxxxxxxxxxxxxxxtrue.sh)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(pkg/BUILD)} spids:[164])
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: 
                    {
                      (DQ ("sh_test(\n") ("  name = ") (Right_DoubleQuote "\"") 
                        (xxxxxxxxxxxxxxxxxxxxxxxxxtrue) (Right_DoubleQuote "\"") (",\n") ("  srcs = [") (Right_DoubleQuote "\"") 
                        (xxxxxxxxxxxxxxxxxxxxxxxxxtrue.sh) (Right_DoubleQuote "\"") ("],\n") (")\n")
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [168]
                )
              ]
            )
          ]
          spids: [129]
        )
      spids: [123 128]
    )
    (FuncDef
      name: test_terminal_columns_honored
      body: 
        (BraceGroup
          children: [
            (C {(setup_bazelrc)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: -1
                  arg_word: {($ VSub_Name "$TEST_TMPDIR") (/bazelrc)}
                  spids: [204]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: {(DQ ("build --terminal_columns=6\n"))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [208]
                )
              ]
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [
                    {(bazel)}
                    {(test)}
                    {(--curses) (Lit_Other "=") (yes)}
                    {(--color) (Lit_Other "=") (yes)}
                    {(pkg) (Lit_Other ":") (xxxxxxxxxxxxxxxxxxxxxxxxxtrue)}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {($ VSub_Name "$TEST_log")}
                      spids: [231]
                    )
                  ]
                )
                (C {(fail)} {(DQ ("bazel test failed"))})
              ]
              op_id: Op_DPipe
            )
            (C {(expect_log)} {(SQ <"^xxxx">)})
            (C {(expect_not_log)} {(SQ <"^xxxxxxx">)})
          ]
          spids: [196]
        )
      spids: [190 195]
    )
    (FuncDef
      name: test_options_override
      body: 
        (BraceGroup
          children: [
            (C {(setup_bazelrc)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: -1
                  arg_word: {($ VSub_Name "$TEST_TMPDIR") (/bazelrc)}
                  spids: [277]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: {(DQ ("build --terminal_columns=6\n"))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [281]
                )
              ]
            )
            (AndOr
              children: [
                (SimpleCommand
                  words: [
                    {(bazel)}
                    {(test)}
                    {(--curses) (Lit_Other "=") (yes)}
                    {(--color) (Lit_Other "=") (yes)}
                    {(--terminal_columns) (Lit_Other "=") (10)}
                    {(pkg) (Lit_Other ":") (xxxxxxxxxxxxxxxxxxxxxxxxxtrue)}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {($ VSub_Name "$TEST_log")}
                      spids: [308]
                    )
                  ]
                )
                (C {(fail)} {(DQ ("bazel test failed"))})
              ]
              op_id: Op_DPipe
            )
            (C {(expect_log)} {(SQ <"^xxxxxxxx">)})
            (C {(expect_not_log)} {(SQ <"^xxxxxxxxxxx">)})
          ]
          spids: [269]
        )
      spids: [263 268]
    )
    (C {(run_suite)} {(DQ ("Integration tests for rc options handling"))})
  ]
)