test/rbbt/util/test_R.rb in rbbt-util-1.2.1 vs test/rbbt/util/test_R.rb in rbbt-util-2.0.1
- old
+ new
@@ -1,9 +1,17 @@
require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helper.rb')
require 'rbbt/util/R'
class TestR < Test::Unit::TestCase
def test_sum
- assert_equal "6", R.run('cat(3+3)').read
+ assert_equal "6", R.run('cat(3+3)').read.split(/\n/).last
+ end
+
+ def test_tsv_R
+ tsv = TSV.new({:a => 1, :b => 2})
+ tsv2 = tsv.R <<-EOF
+data = data + 1
+ EOF
+ puts tsv2.to_s
end
end