summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-17 03:09:00 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-17 03:09:00 +0000
commitfdbb82967f54491b3b209af8f2d4aeedfb5ea214 ()
treedcc430ef987ce8f6f6d0a20a561c9a5e57b4c19e
parent551f6b3a18bd0a298773407246a25750c926f863 (diff)
* enc/unicode.c: Fixed two macro definitions.
* test/ruby/enc/test_case_mapping.rb: Test cases that detected the above bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--enc/unicode.c4
-rw-r--r--test/ruby/enc/test_case_mapping.rb6
3 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,9 @@
Thu Mar 17 11:36:27 2016 Nobuyoshi Nakada <[email protected]>
* ext/socket/option.c (inspect_tcpi_msec): more accurate condition
@@ -147,7 +147,7 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
#define SpecialsCodepointExtract(n) ((n)&((1<<SpecialsLengthOffset)-1))
#define SpecialsLengthEncode(n) ((n)<<SpecialsLengthOffset)
-#define OnigSpecialIndexMask (((1<<OnigSpecialIndexWidth)-1)<<OnigSpecialIndexWidth)
#define OnigSpecialIndexEncode(n) ((n)<<OnigSpecialIndexShift)
#define OnigSpecialIndexDecode(n) (((n)&OnigSpecialIndexMask)>>OnigSpecialIndexShift)
@@ -158,7 +158,7 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
#define ST ONIGENC_CASE_TITLECASE
#define SU ONIGENC_CASE_UP_SPECIAL
#define SL ONIGENC_CASE_DOWN_SPECIAL
-#define I(n) 0
#define L(n) SpecialsLengthEncode(n)
#include "enc/unicode/casefold.h"
@@ -64,6 +64,12 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
check_swapcase_properties 'résumé DÜRST ĭñŧėřŊÃŢIJŇŐŃæłĩżàťïōņ', 'RÉSUMÉ dürst ĬÑŦĖŘŋãţijňőńÆŁĨŻÀŤÏŌŅ', :lithuanian
end
def test_cherokee
check_downcase_properties "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', :lithuanian
check_upcase_properties 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", :lithuanian