Builtin is no more, final conversions done
All preloading where it needs to be (some)tests for the preload split compiler test remembered binary tests (usually just run on travis)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
require_relative "helper"
|
||||
require "rubyx/rubyxc"
|
||||
|
||||
module RubyX
|
||||
class TestRubyXCliCompile < MiniTest::Test
|
||||
|
||||
def test_compile
|
||||
assert_output(/compiling/) {RubyXC.start(["compile" , "--preload","test/mains/source/add__4.rb"])}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
require_relative "helper"
|
||||
require "rubyx/rubyxc"
|
||||
|
||||
module RubyX
|
||||
class TestRubyXCliExecute < MiniTest::Test
|
||||
|
||||
def test_execute
|
||||
assert_output(/Running/) {RubyXC.start(["execute" ,"--preload", "test/mains/source/add__4.rb"])}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
require_relative "helper"
|
||||
require "rubyx/rubyxc"
|
||||
|
||||
module RubyX
|
||||
class TestRubyXCliInterpret < MiniTest::Test
|
||||
|
||||
def test_interpret
|
||||
assert_output(/interpreting/) {RubyXC.start(["interpret" ,"--preload", "test/mains/source/add__4.rb"])}
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -13,21 +13,5 @@ module RubyX
|
||||
def test_file_fail
|
||||
assert_output(nil , /No such file/) {RubyXC.start(["compile" , "hi"])}
|
||||
end
|
||||
def test_file_open
|
||||
assert_output(/compiling/) {RubyXC.start(["compile" , "test/mains/source/add__4.rb"])}
|
||||
#File.delete "add__4.o"
|
||||
end
|
||||
def test_interpret
|
||||
assert_output(/interpreting/) {RubyXC.start(["interpret" , "test/mains/source/add__4.rb"])}
|
||||
end
|
||||
def test_execute
|
||||
assert_output(/Running/) {RubyXC.start(["execute" , "test/mains/source/add__4.rb"])}
|
||||
end
|
||||
def test_stats
|
||||
out, err = capture_io {RubyXC.start(["stats" , "test/mains/source/add__4.rb"])}
|
||||
assert out.include?("Space") , out
|
||||
assert out.include?("Total") , out
|
||||
assert out.include?("Objects=") , out
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
require_relative "helper"
|
||||
require "rubyx/rubyxc"
|
||||
|
||||
module RubyX
|
||||
class TestRubyXCliStats < MiniTest::Test
|
||||
|
||||
def test_stats
|
||||
out, err = capture_io {RubyXC.start(["stats" ,"--preload", "test/mains/source/add__4.rb"])}
|
||||
assert out.include?("Space") , out
|
||||
assert out.include?("Total") , out
|
||||
assert out.include?("Objects=") , out
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user