(command.CommandList
  children: [
    (C {<set>} {<-eu>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RUNFILES)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: <Id.VSub_Name RUNFILES>
                suffix_op: 
                  (suffix_op.Unary
                    tok: <Id.VTest_ColonHyphen ':-'>
                    arg_word: 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.CommandList
                              children: [
                                (command.Sentence
                                  child: 
                                    (C 
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          child: 
                                            (C {<cd>} 
                                              {
                                                (command_sub
                                                  left_token: <Id.Left_DollarParen '$('>
                                                  child: 
                                                    (C {<dirname>} 
                                                      {
                                                        (braced_var_sub
                                                          token: <Id.VSub_Name BASH_SOURCE>
                                                          bracket_op: 
                                                            (bracket_op.ArrayIndex
                                                              expr: {<Id.Lit_Digits 0>}
                                                            )
                                                        )
                                                      }
                                                    )
                                                )
                                              }
                                            )
                                        )
                                      }
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                                (C {<pwd>})
                              ]
                            )
                        )
                      }
                  )
              )
            }
          spids: [55]
        )
      ]
    )
    (C {<source>} {(DQ (${ Id.VSub_Name RUNFILES) <'/examples/shell/lib.sh'>)})
    (command.ShFunction
      name: test_output
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OUTPUT)
                  op: assign_op.Equal
                  rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<showfile>}))}
                  spids: [98]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:EXPECTED_OUTPUT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<cat>} 
                            {(DQ (${ Id.VSub_Name RUNFILES) <'/examples/shell/data/test_file.txt'>)}
                          )
                      )
                    }
                  spids: [104]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name OUTPUT))} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name EXPECTED_OUTPUT))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})]
                  spids: [118 140]
                )
              ]
            )
          ]
        )
    )
    (C {<test_output>})
  ]
)