(command.CommandList
  children: [
    (C {<atf_test_case>} {<has>})
    (command.ShFunction
      name: has_head
      body: 
        (BraceGroup
          children: [(C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_config_has works'>)})]
        )
    )
    (command.ShFunction
      name: has_body
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:h)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<atf_get_srcdir>})
                        ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>}))
                      )
                    }
                  spids: [103]
                )
              ]
            )
            (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> (SQ <'foo not found'>)} {<-e>} {<ignore>} {<-x>} {(DQ <'TEST_VARIABLE=foo '> (${ Id.VSub_Name h) <' config_has'>)}
            )
            (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> (SQ <'foo found'>)} {<-e>} {<ignore>} {<-x>} {(DQ <'TEST_VARIABLE=foo '> (${ Id.VSub_Name h) <' -v foo=bar config_has'>)}
            )
            (C {<echo>} {(DQ <'Checking for deprecated variables'>)})
            (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> (SQ <'workdir not found'>)} {<-e>} {<ignore>} {<-x>} {(DQ <'TEST_VARIABLE=workdir '> (${ Id.VSub_Name h) <' config_has'>)}
            )
          ]
        )
    )
    (C {<atf_test_case>} {<get>})
    (command.ShFunction
      name: get_head
      body: 
        (BraceGroup
          children: [(C {<atf_set>} {(DQ <descr>)} {(DQ <'Verifies that atf_config_get works'>)})]
        )
    )
    (command.ShFunction
      name: get_body
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:h)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<atf_get_srcdir>})
                        ) <'/misc_helpers -s '> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<atf_get_srcdir>}))
                      )
                    }
                  spids: [256]
                )
              ]
            )
            (C {<echo>} {(DQ <'Querying an undefined variable'>)})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.Subshell
                  child: (C {<atf_config_get>} {(DQ <undefined>)})
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<out>}
                    )
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<err>}
                    )
                  ]
                )
                (C {<atf_fail>} {(DQ <'Getting an undefined variable succeeded'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<grep>} {(SQ <'not find'>)} {<err>})
                (C {<atf_fail>} {(DQ <'Getting an undefined variable did not report an error'>)})
              ]
            )
            (C {<echo>} {(DQ <'Querying an undefined variable using a default value'>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:v)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<atf_config_get>} {(DQ <undefined>)} {(DQ <'the default value'>)})
                      )
                    }
                  spids: [330]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name v))} {<Id.Lit_Equals '='>} 
                  {(DQ <'the default value'>)} {<Id.Lit_RBracket ']'>}
                )
                (C {<atf_fail>} {(DQ <'Default value does not work'>)})
              ]
            )
            (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> (SQ <'foo = bar'>)} {<-e>} {<ignore>} {<-x>} {(DQ <'TEST_VARIABLE=foo '> (${ Id.VSub_Name h) <' -v foo=bar config_get'>)}
            )
            (C {<atf_check>} {<-s>} {<eq> <Id.Lit_Colon ':'> <0>} {<-o>} 
              {<match> <Id.Lit_Colon ':'> (SQ <'foo = baz'>)} {<-e>} {<ignore>} {<-x>} {(DQ <'TEST_VARIABLE=foo '> (${ Id.VSub_Name h) <' -v foo=baz config_get'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: atf_init_test_cases
      body: 
        (BraceGroup
          children: [(C {<atf_add_test_case>} {<has>}) (C {<atf_add_test_case>} {<get>})]
        )
    )
  ]
)