mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_pack.rb: fix assertion
* pack.c (pack_unpack): fix indent. * test/ruby/test_pack.rb (test_pack_unpack_M): fix assertion. ignore invalid quoted-printable and just skip. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2b4f1eed4c
commit
7b8e78f747
2 changed files with 3 additions and 4 deletions
4
pack.c
4
pack.c
|
@ -2004,8 +2004,8 @@ pack_unpack(VALUE str, VALUE fmt)
|
|||
while (s < send) {
|
||||
if (*s == '=') {
|
||||
if (++s == send) break;
|
||||
if (s+1 < send && *s == '\r' && *(s+1) == '\n')
|
||||
s++;
|
||||
if (s+1 < send && *s == '\r' && *(s+1) == '\n')
|
||||
s++;
|
||||
if (*s != '\n') {
|
||||
if ((c1 = hex2num(*s)) == -1) break;
|
||||
if (++s == send) break;
|
||||
|
|
|
@ -572,8 +572,7 @@ EXPECTED
|
|||
assert_equal(["a"*1023], (("a"*73+"=\n")*14+"a=\n").unpack("M"))
|
||||
assert_equal(["\x0a"], "=0a=\n".unpack("M"))
|
||||
assert_equal(["\x0a"], "=0A=\n".unpack("M"))
|
||||
assert_equal([""], "=0Z=\n".unpack("M"))
|
||||
assert_equal([""], "=\r\n".unpack("M"))
|
||||
assert_equal(["=0Z=\n"], "=0Z=\n".unpack("M"))
|
||||
assert_equal([""], "=\r\n".unpack("M"))
|
||||
assert_equal(["\xC6\xF7"], "=C6=F7".unpack('M*'))
|
||||
|
||||
|
|
Loading…
Reference in a new issue