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:
Torsten Ruger
2019-02-07 11:07:57 +02:00
parent e634781d6c
commit 51eff62931
3 changed files with 68 additions and 0 deletions

21
test/rubyx/test_rubyxc.rb Normal file
View 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