summaryrefslogtreecommitdiffstats
path: root/tests/mmapt.rb
diff options
context:
space:
mode:
authorguy Decoux <ts@moulon.inra.fr>2009-02-28 20:09:29 +0100
committerguy Decoux <ts@moulon.inra.fr>2009-02-28 20:09:29 +0100
commitfa598d05504f6dd43e29e0f93a3f25d254ebd7c0 (patch)
tree7ecbeaf86a0a418342596d95a45f91f5fc2b01c8 /tests/mmapt.rb
parenta181d44ee4b78d7e016cf5b9e8fd5591723615bd (diff)
downloadmmap-ruby-fa598d05504f6dd43e29e0f93a3f25d254ebd7c0.zip
mmap-ruby-fa598d05504f6dd43e29e0f93a3f25d254ebd7c0.tar.gz
mmap-0.1.9
Diffstat (limited to 'tests/mmapt.rb')
-rw-r--r--tests/mmapt.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mmapt.rb b/tests/mmapt.rb
index c6a1fdc..b94358c 100644
--- a/tests/mmapt.rb
+++ b/tests/mmapt.rb
@@ -140,9 +140,13 @@ class TestMmap < Inh::TestCase
assert_equal($mmap.scan(/include/), $str.scan(/include/), "<scan>")
assert_equal($mmap.index("rb_raise"), $str.index("rb_raise"), "<index>")
assert_equal($mmap.rindex("rb_raise"), $str.rindex("rb_raise"), "<rindex>")
+ assert_equal($mmap.index(/rb_raise/), $str.index(/rb_raise/), "<index>")
+ assert_equal($mmap.rindex(/rb_raise/), $str.rindex(/rb_raise/), "<rindex>")
('a' .. 'z').each do |i|
assert_equal($mmap.index(i), $str.index(i), "<index>")
assert_equal($mmap.rindex(i), $str.rindex(i), "<rindex>")
+ assert_equal($mmap.index(i), $str.index(/#{i}/), "<index>")
+ assert_equal($mmap.rindex(i), $str.rindex(/#{i}/), "<rindex>")
end
$mmap.sub!(/GetMmap/, 'XXXX'); $str.sub!(/GetMmap/, 'XXXX')
assert_equal($mmap.to_str, $str, "<after sub!>")