summaryrefslogtreecommitdiffstats
path: root/tests/mmapt.rb
diff options
context:
space:
mode:
authorguy Decoux <ts@moulon.inra.fr>2009-02-28 20:04:27 +0100
committerguy Decoux <ts@moulon.inra.fr>2009-02-28 20:04:27 +0100
commitddd4bfbddf5d2972f5eaf47bc6b89d154203f45f (patch)
tree25f14c5b4101001ae978e1328c14f6093f5814bc /tests/mmapt.rb
parent05da7503e1606bb7300cea15fcdc3bd36cf79c67 (diff)
downloadmmap-ruby-ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f.zip
mmap-ruby-ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f.tar.gz
mmap-0.1.7
Diffstat (limited to 'tests/mmapt.rb')
-rw-r--r--tests/mmapt.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/mmapt.rb b/tests/mmapt.rb
index 15fe5e4..a7a049c 100644
--- a/tests/mmapt.rb
+++ b/tests/mmapt.rb
@@ -2,12 +2,18 @@
$LOAD_PATH.unshift *%w{.. . tests}
require 'mmap'
require 'ftools'
-require 'runit/testcase'
-require 'runit/cui/testrunner'
+begin
+ require 'test/unit'
+ Inh = Test::Unit
+rescue LoadError
+ require 'runit/testcase'
+ require 'runit/cui/testrunner'
+ Inh = RUNIT
+end
$mmap, $str = nil, nil
-class TestMmap < RUNIT::TestCase
+class TestMmap < Inh::TestCase
def internal_init
$mmap.unmap if $mmap
file = "mmap.c"
@@ -190,4 +196,7 @@ class TestMmap < RUNIT::TestCase
end
-RUNIT::CUI::TestRunner.run(TestMmap.suite)
+if defined?(RUNIT)
+ RUNIT::CUI::TestRunner.run(TestMmap.suite)
+end
+