2009-11-26 12:18:22 +00:00
|
|
|
require 'test/unit'
|
|
|
|
require_relative 'ruby/envutil'
|
|
|
|
|
|
|
|
# mathn redefines too much. It must be isolated to child processes.
|
|
|
|
class TestMathn < Test::Unit::TestCase
|
|
|
|
def test_power
|
2010-06-23 05:32:46 +00:00
|
|
|
assert_in_out_err ['-r', 'mathn', '-e', 'a=1**2;!a'], "", [], [], '[ruby-core:25740]'
|
|
|
|
assert_in_out_err ['-r', 'mathn', '-e', 'a=(1<<126)**2;!a'], "", [], [], '[ruby-core:25740]'
|
2012-04-08 23:05:08 +00:00
|
|
|
assert_in_out_err ['-r', 'mathn/complex', '-e', 'a=Complex(0,1)**4;!a'], "", [], [], '[ruby-core:44170]'
|
2012-04-08 17:53:51 +00:00
|
|
|
assert_in_out_err ['-r', 'mathn/complex', '-e', 'a=Complex(0,1)**5;!a'], "", [], [], '[ruby-core:44170]'
|
2009-11-26 12:18:22 +00:00
|
|
|
end
|
|
|
|
end
|