mains tests can include any code

not wrapping as main anymore
(must still include mains)
first part of #11
This commit is contained in:
Torsten Ruger
2018-08-18 19:42:14 +03:00
parent 233b83510f
commit 80264c5322
7 changed files with 52 additions and 24 deletions

View File

@ -16,7 +16,7 @@ module Mains
tests << method_name
input = File.read(file_name)
self.send(:define_method, method_name ) do
ticks = run_main(input)
ticks = run_input(input)
#puts "Ticks for #{method_name}=#{ticks}"
assert_equal stdout , @interpreter.stdout , "Wrong stdout #{name}"
assert_equal exit_code , get_return.to_s , "Wrong exit code #{name}"