summaryrefslogtreecommitdiff
path: root/test/-ext-/st/test_numhash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/st/test_numhash.rb')
-rw-r--r--test/-ext-/st/test_numhash.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/-ext-/st/test_numhash.rb b/test/-ext-/st/test_numhash.rb
new file mode 100644
index 0000000..9ec072e
--- /dev/null
+++ b/test/-ext-/st/test_numhash.rb
@@ -0,0 +1,21 @@
+require 'test/unit'
+require "-test-/st/numhash"
+
+class Bug::StNumHash
+ class Test_NumHash < Test::Unit::TestCase
+ def setup
+ @tbl = Bug::StNumHash.new
+ 5.times {|i| @tbl[i] = i}
+ end
+
+ def test_check
+ keys = []
+ @tbl.each do |k, v, t|
+ keys << k
+ t[5] = 5 if k == 3
+ true
+ end
+ assert_equal([*0..5], keys)
+ end
+ end
+end