Very basic cli to compile ruby files
Off course this is basically a cross compiler and the files have to be transferred to an arm machine (and fixed as per note) close #22
This commit is contained in:
21
test/rubyx/test_rubyxc.rb
Normal file
21
test/rubyx/test_rubyxc.rb
Normal file
@ -0,0 +1,21 @@
|
||||
require_relative "helper"
|
||||
require "rubyx/rubyxc"
|
||||
|
||||
module RubyX
|
||||
class TestRubyXCli < MiniTest::Test
|
||||
|
||||
def test_invoke_without_not_work
|
||||
assert_output(nil , /not find/) {RubyXC.start(["list"])}
|
||||
end
|
||||
def test_invoke_compile_works
|
||||
assert_output( "") {RubyXC.start(["compile" ])}
|
||||
end
|
||||
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
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user