test/03auto.rb in xkeys-1.0.1 vs test/03auto.rb in xkeys-2.0.0
- old
+ new
@@ -1,9 +1,9 @@
require 'minitest/autorun'
require 'xkeys'
-class TestXK < MiniTest::Unit::TestCase
+class TestXK_03 < MiniTest::Unit::TestCase
def test_hash_set_auto
h = {}.extend XKeys::Set_Auto
assert_respond_to(h, :[]=)
@@ -32,9 +32,12 @@
a.clear; a[0, 1] = '01'
assert_equal([ [ nil, '01' ] ], a, "a[0, 1] = '01'")
a[0, :[]] = '02'
assert_equal([ [ nil, '01', '02' ] ], a, "a[0, :[]] = '02'")
+
+ a.clear; a[0] = ?0; a[:[], 1] = ?1;
+ assert_equal([ ?0, [ nil, ?1 ] ], a, "a[:[], 1]")
end
end
# END