summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-16 12:31:40 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-16 12:31:40 +0900
commitad8e82f70828bf6a0a36648f8b4bdc3142b09968 (patch)
tree3f5b791635fbfd6647d96c6b5521a32a812c3f20 /test
parentb30d7fea569cf64325d55b901af784ee13a477f8 (diff)
Fixed marshal compatibility of Process::Status
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 53d0cd0fa7..a114f279ba 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1425,6 +1425,8 @@ class TestProcess < Test::Unit::TestCase
assert_equal(s.to_i >> 1, s >> 1)
assert_equal(false, s.stopped?)
assert_equal(nil, s.stopsig)
+
+ assert_equal(s, Marshal.load(Marshal.dump(s)))
end
end
@@ -1442,6 +1444,8 @@ class TestProcess < Test::Unit::TestCase
assert_equal(expected,
[s.exited?, s.signaled?, s.stopped?, s.success?],
"[s.exited?, s.signaled?, s.stopped?, s.success?]")
+
+ assert_equal(s, Marshal.load(Marshal.dump(s)))
end
end
@@ -1456,6 +1460,8 @@ class TestProcess < Test::Unit::TestCase
"[s.exited?, s.signaled?, s.stopped?, s.success?]")
assert_equal("#<Process::Status: pid #{ s.pid } SIGQUIT (signal #{ s.termsig })>",
s.inspect.sub(/ \(core dumped\)(?=>\z)/, ''))
+
+ assert_equal(s, Marshal.load(Marshal.dump(s)))
end
end