diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-09 21:52:26 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-09 21:52:26 +0000 |
commit | c43e977e2896d57f616919a6c9c7301f7fae9804 (patch) | |
tree | 040feec70116df906c48901a0e86969e7f620078 /test/nkf | |
parent | 09a7d0173b672e9ba2e0062bf23acbf232afe1cc (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/nkf')
-rw-r--r-- | test/nkf/test_nkf.rb | 6 |
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", "A"), bug2953) + assert_equal("B", NKF.nkf("-w --numchar-input", "B"), bug2953) + end + end |