This commit is contained in:
Nobuyoshi Nakada 2021-10-17 00:46:25 +09:00
Родитель cc8ff8b50d
Коммит 5de6e25144
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
3 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -574,9 +574,9 @@ module Test
jobs_status(worker)
when /^done (.+?)$/
begin
r = Marshal.load($1.unpack("m")[0])
r = Marshal.load($1.unpack1("m"))
rescue
print "unknown object: #{$1.unpack("m")[0].dump}"
print "unknown object: #{$1.unpack1("m").dump}"
return true
end
result << r[0..1] unless r[0..1] == [nil,nil]
@ -587,7 +587,7 @@ module Test
return true
when /^record (.+?)$/
begin
r = Marshal.load($1.unpack("m")[0])
r = Marshal.load($1.unpack1("m"))
suite = r.first
key = [worker.name, suite]
@ -597,18 +597,18 @@ module Test
@records[key] = [worker.start_time, Time.now]
end
rescue => e
print "unknown record: #{e.message} #{$1.unpack("m")[0].dump}"
print "unknown record: #{e.message} #{$1.unpack1("m").dump}"
return true
end
record(fake_class(r[0]), *r[1..-1])
when /^p (.+?)$/
del_jobs_status
print $1.unpack("m")[0]
print $1.unpack1("m")
jobs_status(worker) if @options[:job_status] == :replace
when /^after (.+?)$/
@warnings << Marshal.load($1.unpack("m")[0])
@warnings << Marshal.load($1.unpack1("m"))
when /^bye (.+?)$/
after_worker_down worker, Marshal.load($1.unpack("m")[0])
after_worker_down worker, Marshal.load($1.unpack1("m"))
when /^bye$/, nil
if shutting_down || worker.quit_called
after_worker_quit worker

Просмотреть файл

@ -107,7 +107,7 @@ module Test
case buf.chomp
when /^loadpath (.+?)$/
@old_loadpath = $:.dup
$:.push(*Marshal.load($1.unpack("m")[0].force_encoding("ASCII-8BIT"))).uniq!
$:.push(*Marshal.load($1.unpack1("m").force_encoding("ASCII-8BIT"))).uniq!
when /^run (.+?) (.+?)$/
_report "okay"

Просмотреть файл

@ -99,7 +99,7 @@ module TestParallel
break if /^p (.+?)$/ =~ buf
end
assert_not_nil($1, "'p' was not found")
assert_match(/TestA#test_nothing_test = \d+\.\d+ s = \.\n/, $1.chomp.unpack("m")[0])
assert_match(/TestA#test_nothing_test = \d+\.\d+ s = \.\n/, $1.chomp.unpack1("m"))
end
end
@ -111,7 +111,7 @@ module TestParallel
end
assert_not_nil($1, "'done' was not found")
result = Marshal.load($1.chomp.unpack("m")[0])
result = Marshal.load($1.chomp.unpack1("m"))
assert_equal(5, result[0])
pend "TODO: result[1] returns 17. We should investigate it" do
assert_equal(12, result[1])