Sha256: 0d8fc1d0b9ef00b97589cae9f85a66c03d0f8fbe1945e61d04d18a7cfd53b550
Contents?: true
Size: 785 Bytes
Versions: 12
Compression:
Stored size: 785 Bytes
Contents
#!/usr/bin/env ruby require 'test/unit' require 'trace' require_relative 'fn_helper' class TestFinish < Test::Unit::TestCase include FnTestHelper def test_finish_between_fn # Finish over functions def fact(x) return 1 if x <= 1 x = x * fact(x-1) return x end cmds = %w(step finish) + ['24 == x', 'continue'] d = strarray_setup(cmds) d.start ############################## x = fact(4) y = 5 ############################## d.stop # ({:remove => true}) out = ['-- ', 'x = fact(4)', 'METHOD TestFinish#fact(x)', '-> ', 'def fact(x)', '<- ', 'R=> 24', 'end', 'D=> true'] compare_output(out, d, cmds) end end
Version data entries
12 entries across 12 versions & 1 rubygems