---
:tests:

  "RFC7162 CONDSTORE 3.1.2.1. HIGHESTMODSEQ Response Code":
    :response: "* OK [HIGHESTMODSEQ 715194045007]\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: OK
      data: !ruby/struct:Net::IMAP::ResponseText
        code: !ruby/struct:Net::IMAP::ResponseCode
          name: HIGHESTMODSEQ
          data: 715194045007
        text: ''
      raw_data: "* OK [HIGHESTMODSEQ 715194045007]\r\n"

  "RFC7162 CONDSTORE 3.1.2.2. NOMODSEQ Response Code":
    :response: "* OK [NOMODSEQ] Sorry, this mailbox format doesn't support
      modsequences\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: OK
      data: !ruby/struct:Net::IMAP::ResponseText
        code: !ruby/struct:Net::IMAP::ResponseCode
          name: NOMODSEQ
          data:
        text: Sorry, this mailbox format doesn't support modsequences
      raw_data: "* OK [NOMODSEQ] Sorry, this mailbox format doesn't support
        modsequences\r\n"

  "RFC7162 CONDSTORE 3.1.3. Example 3 (FETCH MODSEQ)":
    :response: "* 4 FETCH (UID 8 MODSEQ (12121230956))\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: FETCH
      data: !ruby/struct:Net::IMAP::FetchData
        seqno: 4
        attr:
          UID: 8
          MODSEQ: 12121230956
      raw_data: "* 4 FETCH (UID 8 MODSEQ (12121230956))\r\n"

  "RFC7162 CONDSTORE 3.1.3. Example 4 (FETCH MODSEQ)":
    :response: "* 50 FETCH (MODSEQ (12111230048))\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: FETCH
      data: !ruby/struct:Net::IMAP::FetchData
        seqno: 50
        attr:
          MODSEQ: 12111230048
      raw_data: "* 50 FETCH (MODSEQ (12111230048))\r\n"

  "RFC7162 CONDSTORE 3.1.3. Example 6 (MODIFIED Response Code)":
    :response: "d105 OK [MODIFIED 7,9] Conditional STORE failed\r\n"
    :expected: !ruby/struct:Net::IMAP::TaggedResponse
      tag: d105
      name: OK
      data: !ruby/struct:Net::IMAP::ResponseText
        code: !ruby/struct:Net::IMAP::ResponseCode
          name: MODIFIED
          data: !ruby/object:Net::IMAP::SequenceSet
            string: '7,9'
        text: Conditional STORE failed
      raw_data: "d105 OK [MODIFIED 7,9] Conditional STORE failed\r\n"

  "RFC7162 CONDSTORE 3.1.5. MODSEQ Search Criterion in SEARCH":
    :response: "* SEARCH 2 5 6 7 11 12 18 19 20 23 (MODSEQ 917162500)\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: SEARCH
      data: !ruby/array:Net::IMAP::SearchResult
        internal:
        - 2
        - 5
        - 6
        - 7
        - 11
        - 12
        - 18
        - 19
        - 20
        - 23
        ivars:
          :@modseq: 917162500
      raw_data: "* SEARCH 2 5 6 7 11 12 18 19 20 23 (MODSEQ 917162500)\r\n"

  "RFC7162 CONDSTORE 3.1.7. HIGHESTMODSEQ Status Data Items":
    :response: "* STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292 HIGHESTMODSEQ
      7011231777)\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: STATUS
      data: !ruby/struct:Net::IMAP::StatusData
        mailbox: blurdybloop
        attr:
          MESSAGES: 231
          UIDNEXT: 44292
          HIGHESTMODSEQ: 7011231777
      raw_data: "* STATUS blurdybloop (MESSAGES 231 UIDNEXT 44292 HIGHESTMODSEQ
        7011231777)\r\n"

  "RFC7162 CONDSTORE 3.1.10. Example 19 (Interaction with ESEARCH)":
    :response: "* ESEARCH (TAG \"a\") ALL 1:3,5 MODSEQ 1236\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: ESEARCH
      data: !ruby/object:Net::IMAP::ESearchResult
        tag: a
        uid: false
        data:
        - - ALL
          - !ruby/object:Net::IMAP::SequenceSet
            string: 1:3,5
        - - MODSEQ
          - 1236
      raw_data: "* ESEARCH (TAG \"a\") ALL 1:3,5 MODSEQ 1236\r\n"

  "RFC7162 CONDSTORE 3.1.10. Example 20 (Interaction with ESEARCH)":
    :response: "* ESEARCH (TAG \"a\") ALL 5,3,2,1 MODSEQ 1236\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: ESEARCH
      data: !ruby/object:Net::IMAP::ESearchResult
        tag: a
        uid: false
        data:
        - - ALL
          - !ruby/object:Net::IMAP::SequenceSet
            string: '5,3,2,1'
        - - MODSEQ
          - 1236
      raw_data: "* ESEARCH (TAG \"a\") ALL 5,3,2,1 MODSEQ 1236\r\n"

  "RFC7162 QRESYNC 3.2.5.1. Modification Sequence and UID Parameters":
    :response: "* VANISHED (EARLIER) 41,43:116,118,120:211,214:540\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: VANISHED
      data: !ruby/object:Net::IMAP::VanishedData
        uids: !ruby/object:Net::IMAP::SequenceSet
          string: 41,43:116,118,120:211,214:540
        earlier: true
      raw_data: "* VANISHED (EARLIER) 41,43:116,118,120:211,214:540\r\n"

  "RFC7162 QRESYNC 3.2.7. EXPUNGE Command":
    :response: "* VANISHED 405,407,410,425\r\n"
    :expected: !ruby/struct:Net::IMAP::UntaggedResponse
      name: VANISHED
      data: !ruby/object:Net::IMAP::VanishedData
        uids: !ruby/object:Net::IMAP::SequenceSet
          string: '405,407,410,425'
        earlier: false
      raw_data: "* VANISHED 405,407,410,425\r\n"
