1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-10-27 14:36:35 +00:00
parent 6964c0635f
commit 303abc5ab8

View file

@ -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