diff options
author | guy Decoux <ts@moulon.inra.fr> | 2009-02-28 20:04:27 +0100 |
---|---|---|
committer | guy Decoux <ts@moulon.inra.fr> | 2009-02-28 20:04:27 +0100 |
commit | ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f (patch) | |
tree | 25f14c5b4101001ae978e1328c14f6093f5814bc /tests | |
parent | 05da7503e1606bb7300cea15fcdc3bd36cf79c67 (diff) | |
download | mmap-ruby-ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f.zip mmap-ruby-ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f.tar.gz |
mmap-0.1.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mmapt.rb | 17 |
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 + |