Project

General

Profile

Feature #16626 ยป 0002-net-imap-do-not-return-leading-space-in-resp-text.patch

nevans (Nicholas Evans), 02/11/2020 06:48 PM

View differences:

lib/net/imap.rb
3173 3173
          end
3174 3174
        end
3175 3175
        match(T_RBRA)
3176
        @pos += 1 if @str[@pos] == " "
3176 3177
        @lex_state = EXPR_RTEXT
3177 3178
        return result
3178 3179
      end
test/net/imap/test_imap_response_parser.rb
236 236
    assert_equal("AUTH=PLAIN", response.data.last)
237 237
    response = parser.parse("* OK [CAPABILITY IMAP4rev1 SASL-IR 1234 NIL THIS+THAT + AUTH=PLAIN ID] IMAP4rev1 Hello\r\n")
238 238
    assert_equal("OK", response.name)
239
    assert_equal(" IMAP4rev1 Hello", response.data.text)
239
    assert_equal("IMAP4rev1 Hello", response.data.text)
240 240
    code = response.data.code
241 241
    assert_equal("CAPABILITY", code.name)
242 242
    assert_equal(
243
-