From cdecafff8dde562debf8cf8a8f9e0e0a9752b6f8 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 26 Nov 2009 12:18:22 +0000 Subject: [PATCH] * test/test_mathn.rb (TestMathn): new test case. test for r25067. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/test_mathn.rb | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/test_mathn.rb diff --git a/ChangeLog b/ChangeLog index ff7cea8d71..cb0ff8e1eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 26 21:13:36 2009 Yuki Sonoda (Yugui) + + * test/test_mathn.rb (TestMathn): new test case. + test for r25067. + Thu Nov 26 21:11:23 2009 Yuki Sonoda (Yugui) * test/openssl/test_config.rb (OpenSSL::TestConfig): new test case. diff --git a/test/test_mathn.rb b/test/test_mathn.rb new file mode 100644 index 0000000000..d0bf03760d --- /dev/null +++ b/test/test_mathn.rb @@ -0,0 +1,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