---
:tests:
  # 7.2.4   STATUS Response
  #
  #    Example:    S: * STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292)
  rfc3501_7.2.4_STATUS_response_example:
    :response: "* STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292)\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: STATUS
      data: !ruby/struct:Net::IMAP::StatusData
        mailbox: blurdybloop
        attr:
          MESSAGES: 231
          UIDNEXT: 44292
      raw_data: "* STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292)\r\n"

  test_status_response_uidnext_uidvalidity:
    :response: "* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234)\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: STATUS
      data: !ruby/struct:Net::IMAP::StatusData
        mailbox: INBOX
        attr:
          UIDNEXT: 1
          UIDVALIDITY: 1234
      raw_data: "* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234)\r\n"

  test_invalid_status_response_trailing_space:
    :comments: |
      [Bug #13649]
    :response: "* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234) \r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: STATUS
      data: !ruby/struct:Net::IMAP::StatusData
        mailbox: INBOX
        attr:
          UIDNEXT: 1
          UIDVALIDITY: 1234
      raw_data: "* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234) \r\n"

  test_imaginary_status_response_using_tagged-ext-val:
    :response: &test_imaginary_status_response_using_tagged_ext_val
      "* STATUS mbox (num 1 seq 1234:5,*:789654 comp-empty ()
      comp-quoted (\"quoted string\") comp-astring (nil) comp-multi (1 \"str\"
      2:3,7:77 nil (nested (several (layers)))))\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: STATUS
      data: !ruby/struct:Net::IMAP::StatusData
        mailbox: mbox
        attr:
          NUM: 1
          SEQ: !ruby/struct:Net::IMAP::ExtensionData
            data: !ruby/object:Net::IMAP::SequenceSet
              string: 1234:5,*:789654
          COMP-EMPTY: !ruby/struct:Net::IMAP::ExtensionData
            data: []
          COMP-QUOTED: !ruby/struct:Net::IMAP::ExtensionData
            data:
            - quoted string
          COMP-ASTRING: !ruby/struct:Net::IMAP::ExtensionData
            data:
            - nil
          COMP-MULTI: !ruby/struct:Net::IMAP::ExtensionData
            data:
            - 1
            - str
            - 2:3,7:77
            - nil
            - - nested
              - - several
                - - layers
      raw_data: *test_imaginary_status_response_using_tagged_ext_val
