From 554841c7fe29ff4c4224c83e004a2c22766a4c51 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/sdbm/test_sdbm.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/sdbm/test_sdbm.rb b/test/sdbm/test_sdbm.rb index 99450640b..25e537104 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