diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-27 14:36:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-27 14:36:35 +0000 |
commit | 303abc5ab8ab695d11ccdef9f1460010704e02fe (patch) | |
tree | a8ea2bb4b978a4469e798a0d53b3f727d9ec8193 | |
parent | 6964c0635f76ea79a49c8dcb85f279e0b85fc0cd (diff) | |
download | ruby-303abc5ab8ab695d11ccdef9f1460010704e02fe.tar.gz |
test_marshal.rb: test_no_internal_ids
* test/ruby/test_marshal.rb (test_no_internal_ids): test for
r52304, no internal IDs should be exposed by Marshal.dump.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_marshal.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 3548850a42..5aa13369a6 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -695,4 +695,20 @@ class TestMarshal < Test::Unit::TestCase Marshal.load(d) } end + + def test_no_internal_ids + opt = %w[--disable=gems] + args = [opt, 'Marshal.dump("",STDOUT)', true, true, encoding: Encoding::ASCII_8BIT] + out, err, status = EnvUtil.invoke_ruby(*args) + assert_empty(err) + assert_predicate(status, :success?) + expected = out + + opt << "--enable=frozen-string-literal" + opt << "--enable=frozen-string-literal-debug" + out, err, status = EnvUtil.invoke_ruby(*args) + assert_empty(err) + assert_predicate(status, :success?) + assert_equal(expected, out) + end end |