Skip to content

Commit 4b54a07

Browse files
committed
✅ Add more helpful error message for tests
1 parent 634854b commit 4b54a07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/net/imap/fake_server/command_reader.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def get_command
3030

3131
# TODO: convert bad command exception to tagged BAD response, when possible
3232
def parse(buf)
33-
/\A([^ ]+) ((?:UID )?\w+)(?: (.+))?\r\n\z/min =~ buf or raise "bad request"
33+
/\A([^ ]+) ((?:UID )?\w+)(?: (.+))?\r\n\z/min =~ buf or
34+
raise "bad request: %p" [buf]
3435
case $2.upcase
3536
when "LOGIN", "SELECT", "ENABLE", "AUTHENTICATE"
3637
Command.new $1, $2, scan_astrings($3), buf

0 commit comments

Comments
 (0)