|
| 1 | +--- |
| 2 | +:tests: |
| 3 | + |
| 4 | + # The same examples are used by RFC9051 §6.3.10 |
| 5 | + NAMESPACE_rfc2342_example_5.1: |
| 6 | + :response: &rfc2342_ex5_1 "* NAMESPACE ((\"\" \"/\")) NIL NIL\r\n" |
| 7 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 8 | + name: NAMESPACE |
| 9 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 10 | + personal: |
| 11 | + - !ruby/struct:Net::IMAP::Namespace |
| 12 | + prefix: '' |
| 13 | + delim: "/" |
| 14 | + extensions: {} |
| 15 | + other: [] |
| 16 | + shared: [] |
| 17 | + raw_data: *rfc2342_ex5_1 |
| 18 | + |
| 19 | + NAMESPACE_rfc2342_example_5.2: |
| 20 | + :response: &rfc2342_ex5_2 "* NAMESPACE NIL NIL ((\"\" \".\"))\r\n" |
| 21 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 22 | + name: NAMESPACE |
| 23 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 24 | + personal: [] |
| 25 | + other: [] |
| 26 | + shared: |
| 27 | + - !ruby/struct:Net::IMAP::Namespace |
| 28 | + prefix: '' |
| 29 | + delim: "." |
| 30 | + extensions: {} |
| 31 | + raw_data: *rfc2342_ex5_2 |
| 32 | + |
| 33 | + NAMESPACE_rfc2342_example_5.3: |
| 34 | + :response: &rfc2342_ex5_3 "* NAMESPACE ((\"\" \"/\")) NIL ((\"Public Folders/\" \"/\"))\r\n" |
| 35 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 36 | + name: NAMESPACE |
| 37 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 38 | + personal: |
| 39 | + - !ruby/struct:Net::IMAP::Namespace |
| 40 | + prefix: '' |
| 41 | + delim: "/" |
| 42 | + extensions: {} |
| 43 | + other: [] |
| 44 | + shared: |
| 45 | + - !ruby/struct:Net::IMAP::Namespace |
| 46 | + prefix: Public Folders/ |
| 47 | + delim: "/" |
| 48 | + extensions: {} |
| 49 | + raw_data: *rfc2342_ex5_3 |
| 50 | + |
| 51 | + NAMESPACE_rfc2342_example_5.4: |
| 52 | + # WARNING: this example is wrong and will be fixed soon... |
| 53 | + :response: &rfc2342_ex5_4 "* NAMESPACE ((\"\" \"/\")) ((\"~\" \"/\")) ((\"#shared/\" \"/\") (\"#public/\" |
| 54 | + \"/\") (\"#ftp/\" \"/\") (\"#news.\" \".\"))\r\n" |
| 55 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 56 | + name: NAMESPACE |
| 57 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 58 | + personal: |
| 59 | + - !ruby/struct:Net::IMAP::Namespace |
| 60 | + prefix: '' |
| 61 | + delim: "/" |
| 62 | + extensions: {} |
| 63 | + other: |
| 64 | + - !ruby/struct:Net::IMAP::Namespace |
| 65 | + prefix: "~" |
| 66 | + delim: "/" |
| 67 | + extensions: {} |
| 68 | + shared: |
| 69 | + - !ruby/struct:Net::IMAP::Namespace |
| 70 | + prefix: "#shared/" |
| 71 | + delim: "/" |
| 72 | + extensions: {} |
| 73 | + - !ruby/struct:Net::IMAP::Namespace |
| 74 | + prefix: "#public/" |
| 75 | + delim: "/" |
| 76 | + extensions: {} |
| 77 | + - !ruby/struct:Net::IMAP::Namespace |
| 78 | + prefix: "#ftp/" |
| 79 | + delim: "/" |
| 80 | + extensions: {} |
| 81 | + - !ruby/struct:Net::IMAP::Namespace |
| 82 | + prefix: "#news." |
| 83 | + delim: "." |
| 84 | + extensions: {} |
| 85 | + raw_data: *rfc2342_ex5_4 |
| 86 | + |
| 87 | + NAMESPACE_rfc2342_example_5.5: |
| 88 | + # FYI: it looks like both RFCs contain an extra SP char in this example |
| 89 | + :response: &rfc2342_ex5_5 "* NAMESPACE ((\"INBOX.\" \".\")) NIL NIL\r\n" |
| 90 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 91 | + name: NAMESPACE |
| 92 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 93 | + personal: |
| 94 | + - !ruby/struct:Net::IMAP::Namespace |
| 95 | + prefix: INBOX. |
| 96 | + delim: "." |
| 97 | + extensions: {} |
| 98 | + other: [] |
| 99 | + shared: [] |
| 100 | + raw_data: *rfc2342_ex5_5 |
| 101 | + |
| 102 | + NAMESPACE_rfc2342_example_5.6: |
| 103 | + :response: &rfc2342_ex5_6 "* NAMESPACE ((\"\" \"/\") (\"#mh/\" \"/\" \"X-PARAM\" (\"FLAG1\" \"FLAG2\"))) |
| 104 | + NIL NIL\r\n" |
| 105 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 106 | + name: NAMESPACE |
| 107 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 108 | + personal: |
| 109 | + - !ruby/struct:Net::IMAP::Namespace |
| 110 | + prefix: '' |
| 111 | + delim: "/" |
| 112 | + extensions: {} |
| 113 | + - !ruby/struct:Net::IMAP::Namespace |
| 114 | + prefix: "#mh/" |
| 115 | + delim: "/" |
| 116 | + extensions: |
| 117 | + X-PARAM: |
| 118 | + - FLAG1 |
| 119 | + - FLAG2 |
| 120 | + other: [] |
| 121 | + shared: [] |
| 122 | + raw_data: *rfc2342_ex5_6 |
| 123 | + |
| 124 | + NAMESPACE_rfc2342_example_5.7: |
| 125 | + :response: &rfc2342_ex5_7 "* NAMESPACE ((\"\" \"/\")) ((\"Other Users/\" \"/\")) NIL\r\n" |
| 126 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 127 | + name: NAMESPACE |
| 128 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 129 | + personal: |
| 130 | + - !ruby/struct:Net::IMAP::Namespace |
| 131 | + prefix: '' |
| 132 | + delim: "/" |
| 133 | + extensions: {} |
| 134 | + other: |
| 135 | + - !ruby/struct:Net::IMAP::Namespace |
| 136 | + prefix: Other Users/ |
| 137 | + delim: "/" |
| 138 | + extensions: {} |
| 139 | + shared: [] |
| 140 | + raw_data: *rfc2342_ex5_7 |
| 141 | + |
| 142 | + NAMESPACE_rfc9051_6.3.10_example_8: |
| 143 | + :response: &rfc9051_6_3_10_ex8 "* NAMESPACE ((\"\" \"/\")) ((\"#Users/\" \"/\")) NIL\r\n" |
| 144 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 145 | + name: NAMESPACE |
| 146 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 147 | + personal: |
| 148 | + - !ruby/struct:Net::IMAP::Namespace |
| 149 | + prefix: '' |
| 150 | + delim: "/" |
| 151 | + extensions: {} |
| 152 | + other: |
| 153 | + - !ruby/struct:Net::IMAP::Namespace |
| 154 | + prefix: "#Users/" |
| 155 | + delim: "/" |
| 156 | + extensions: {} |
| 157 | + shared: [] |
| 158 | + raw_data: *rfc9051_6_3_10_ex8 |
| 159 | + raw_data: "* NAMESPACE ((\"\" \"/\")) ((\"#Users/\" \"/\")) NIL\r\n" |
| 160 | + |
| 161 | + NAMESPACE_rfc2342_example_5.9: |
| 162 | + :response: &rfc2342_ex5_9 "* NAMESPACE ((\"\" \"/\")) ((\"~\" \"/\")) NIL\r\n" |
| 163 | + :expected: !ruby/struct:Net::IMAP::UntaggedResponse |
| 164 | + name: NAMESPACE |
| 165 | + data: !ruby/struct:Net::IMAP::Namespaces |
| 166 | + personal: |
| 167 | + - !ruby/struct:Net::IMAP::Namespace |
| 168 | + prefix: '' |
| 169 | + delim: "/" |
| 170 | + extensions: {} |
| 171 | + other: |
| 172 | + - !ruby/struct:Net::IMAP::Namespace |
| 173 | + prefix: "~" |
| 174 | + delim: "/" |
| 175 | + extensions: {} |
| 176 | + shared: [] |
| 177 | + raw_data: "* NAMESPACE ((\"\" \"/\")) ((\"~\" \"/\")) NIL\r\n" |
0 commit comments