summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-09 21:52:26 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-09 21:52:26 +0000
commitc43e977e2896d57f616919a6c9c7301f7fae9804 (patch)
tree040feec70116df906c48901a0e86969e7f620078 /test
parent09a7d0173b672e9ba2e0062bf23acbf232afe1cc (diff)
ext/nkf/nkf-utf8/nkf.c: Backport #2953 [ruby-dev:40606]; change nkf_char buffer in numchar_getc() size form 8 to 10 to avoid potential for a segfault.
test/nkf/test_nkf.rb: Added a test for the change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@28242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/nkf/test_nkf.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/nkf/test_nkf.rb b/test/nkf/test_nkf.rb
index 279ad59e1a..ab5c8f4305 100644
--- a/test/nkf/test_nkf.rb
+++ b/test/nkf/test_nkf.rb
@@ -13,4 +13,10 @@ Ruby"
assert_equal(::NKF::EUC, NKF.guess(str_euc))
end
+ def test_numchar_input
+ bug2953 = '[ruby-dev:40606]'
+ assert_equal("A", NKF.nkf("-w --numchar-input", "&#x000041;"), bug2953)
+ assert_equal("B", NKF.nkf("-w --numchar-input", "&#0000066;"), bug2953)
+ end
+
end