diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-18 12:53:31 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-18 12:53:31 +0000 |
commit | e8665a6bc271654de993e8cfca08164717236cd1 (patch) | |
tree | 396cdbb30140e9b188728b4eb916233a4b1953bb /test/ruby/test_pack.rb | |
parent | 713e99cec284a7bfdfdc6b598102028e0f844b8f (diff) | |
download | ruby-e8665a6bc271654de993e8cfca08164717236cd1.tar.gz |
* pack.c (pack_unpack): call PACK_ITEM_ADJUST for 'Q'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_pack.rb')
-rw-r--r-- | test/ruby/test_pack.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb index 6101a30219..7cc3f0089e 100644 --- a/test/ruby/test_pack.rb +++ b/test/ruby/test_pack.rb @@ -491,4 +491,11 @@ class TestPack < Test::Unit::TestCase def test_length_too_big assert_raise(RangeError) { [].pack("C100000000000000000000") } end + + def test_short_string + %w[n N v V s S l L q Q].each {|fmt| + str = [1].pack(fmt) + assert_equal([1,nil], str.unpack("#{fmt}2")) + } + end end |