Skip to content

Commit

Permalink
get ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
monkstone committed Aug 6, 2020
1 parent de0ecab commit 730319a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ task :test do
FLF = '%<home>s/.jruby_art/config.yml'
config = File.exist?(format(FLF, home: home))
if config
ruby 'test/k9_run_test.rb'
system 'jruby test/k9_run_test.rb'
else
WNF = 'Create a config %<home>s/.jruby_art/config.yml to run sketch tests'
warn format(WNF, home: home)
Expand Down
36 changes: 17 additions & 19 deletions test/k9_run_test.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# frozen_string_literal: true

gem 'minitest' # don't use bundled minitest
require 'minitest/autorun'
require 'minitest/pride'
require_relative 'test_helper'

Dir.chdir(File.dirname(__FILE__))

# Sketch tests
class Rp5Test < Minitest::Test
def test_normal
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/basic.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/basic.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -21,8 +19,8 @@ def test_normal

def test_sketch_path
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/sketch_path.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/sketch_path.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -32,8 +30,8 @@ def test_sketch_path

def test_on_top
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/on_top.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/on_top.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -43,8 +41,8 @@ def test_on_top

def test_p2d
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/p2d.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/p2d.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -64,8 +62,8 @@ def test_proc_root
def test_fx2d
skip 'Currently FX2D not implemented'
out, _err = capture_io do
open('|../bin/k9 -r sketches/fx2d.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/fx2d.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -74,8 +72,8 @@ def test_fx2d

def test_p3d
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/p3d.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/p3d.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -85,8 +83,8 @@ def test_p3d

def test_graphics
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/graphics.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/graphics.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand All @@ -96,8 +94,8 @@ def test_graphics

def test_setup_exception
out, _err_ = capture_io do
open('|../bin/k9 -r sketches/setup_ex.rb', 'r') do |io|
while l = io.gets
Kernel.open('|../bin/k9 -r sketches/setup_ex.rb', 'r') do |io|
while (l = io.gets)
puts(l.chop)
end
end
Expand Down

0 comments on commit 730319a

Please sign in to comment.