From bafad1ca3b34631bb2ca3c9da0f624143da5f058 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 3 Jun 2005 16:43:40 +0000 Subject: * test/sdbm/test_sdbm.rb: renamed from ext/sdbm/testsdbm.rb with modification to use test/unit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/sdbm/test_sdbm.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 99450640b3..25e5371048 100644 --- a/test/sdbm/test_sdbm.rb +++ b/test/sdbm/test_sdbm.rb @@ -191,6 +191,13 @@ class TestSDBM < Test::Unit::TestCase assert_nil(@sdbm['bar']) end + def test_indexes + keys = %w(foo bar baz) + values = %w(FOO BAR BAZ) + @sdbm[keys[0]], @sdbm[keys[1]], @sdbm[keys[2]] = values + assert_equal(values.reverse, @sdbm.indexes(*keys.reverse)) + end + def test_values_at keys = %w(foo bar baz) values = %w(FOO BAR BAZ) @@ -512,4 +519,3 @@ class TestSDBM < Test::Unit::TestCase } end end - -- cgit v1.2.3