diff options
author | murphy <murphy@rubychan.de> | 2009-10-18 17:16:59 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-10-18 17:16:59 +0000 |
commit | b6f6dd95ebd94391e8ca03ebd37f6863a6aecfb6 (patch) | |
tree | 7a5e5d978fe5eb908cdcf6e993503598c61df338 /test/functional | |
parent | ad7ec30516b427183e14de3d56ceb104eeaa01f0 (diff) | |
download | coderay-b6f6dd95ebd94391e8ca03ebd37f6863a6aecfb6.tar.gz |
Testing whether #dup works for WordList as expected.
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/word_list.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/word_list.rb b/test/functional/word_list.rb index 4399c6a..04f4a02 100644 --- a/test/functional/word_list.rb +++ b/test/functional/word_list.rb @@ -67,4 +67,13 @@ class WordListTest < Test::Unit::TestCase assert_equal :reserved, list['FooBar'] end + def test_dup + list = WordList.new(:ident).add(['foobar'], :reserved) + assert_equal :reserved, list['foobar'] + list2 = list.dup + list2.add(%w[foobar], :keyword) + assert_equal :keyword, list2['foobar'] + assert_equal :reserved, list['foobar'] + end + end
\ No newline at end of file |