summaryrefslogtreecommitdiff
path: root/test/test_mathn.rb
blob: d0bf03760dbc458cc290bbc72930843585e04302 (plain)
1
2
3
4
5
6
7
8
9
10
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
    assert_in_out_err ['-r', 'mathn', '-e', '1**2'], [], [], [], '[ruby-core:25740]'
    assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], [], [], [], '[ruby-core:25740]'
  end
end