summaryrefslogtreecommitdiff
path: root/test/ruby/test_pack.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-18 04:12:35 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-18 04:12:35 +0000
commit0a8d8b8a684dc66669c6b2add3637c78673a97fe (patch)
treefa17f1f7a71fac9a5fe7e08109fba48645237aa3 /test/ruby/test_pack.rb
parentb2556b548104edc594b10af20982fa23bc3ce928 (diff)
* pack.c (pack_pack): Add native size option ! to q and Q.
[ruby-dev:42375] * pack.c (pack_unpack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_pack.rb')
-rw-r--r--test/ruby/test_pack.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index 83b4582776..0c5f0383b0 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -85,7 +85,9 @@ class TestPack < Test::Unit::TestCase
assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("I!"+mod))
assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("l!"+mod))
assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("L!"+mod))
- %w[s S l L q Q s! S! i I i! I! l! L!].each {|fmt|
+ assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("q!"+mod))
+ assert_match(/\A\x00*\x01\x02\x03\x04\z/, [0x01020304].pack("Q!"+mod))
+ %w[s S l L q Q s! S! i I i! I! l! L! q! Q!].each {|fmt|
fmt += mod
nuls = [0].pack(fmt)
v = 0
@@ -118,7 +120,9 @@ class TestPack < Test::Unit::TestCase
assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("I!"+mod))
assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("l!"+mod))
assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("L!"+mod))
- %w[s S l L q Q s! S! i I i! I! l! L!].each {|fmt|
+ assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("q!"+mod))
+ assert_match(/\A\x04\x03\x02\x01\x00*\z/, [0x01020304].pack("Q!"+mod))
+ %w[s S l L q Q s! S! i I i! I! l! L! q! Q!].each {|fmt|
fmt += mod
nuls = [0].pack(fmt)
v = 0