aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/enc
Commit message (Collapse)AuthorAgeFilesLines
* * enc/unicode/case-folding.rb, casefold.h: Data generation to implementduerst2016-04-011-0/+13
| | | | | | | | | | | | | swapcase functionality for titlecase characters. Swapcase isn't defined by Unicode, because the purpose/usage of swapcase is unclear anyway. The implementation follows a proposal from Nobu, swaping the case of each component of a titlecase character individually. This means that the titlecase characters have to be decomposed. * enc/unicode.c: Code using the above data. * test/ruby/enc/test_case_mapping.rb: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode/case-folding.rb, casefold.h: Tweaked handling of 6duerst2016-03-291-6/+11
| | | | | | | | | | special cases in CaseUnfold_11_Table. * enc/unicode.c: Adjustments for above. * test/ruby/enc/test_case_mapping.rb: Tests for the above: Some tests in test_titlecase activated; test_greek added. A test in test_cherokee fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Additional tests title case;duerst2016-03-251-0/+9
| | | | | | | some not yet activated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Additional flag for characters that are titlecase.duerst2016-03-221-0/+6
| | | | | | | | | | * enc/unicode/case-folding.rb, casefold.h: Using above flag in data. * enc/unicode.c: Marking capitalized character as unmodified if it is already titlecase. * test/ruby/enc/test_case_mapping.rb: Tests for above functionality. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Fixed two macro definitions.duerst2016-03-171-0/+6
| | | | | | | | * 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
* * test/ruby/enc/test_case_mapping.rb: Fixed and activated a test for Cherokee.duerst2016-03-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Fixed a logical error.duerst2016-03-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Adding tests for Cherokee.duerst2016-03-161-0/+8
| | | | | | | | One test not yet working. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Adding tests for actual Unicodeduerst2016-03-161-6/+21
| | | | | | | | case mapping. Fixing some aliasing issues. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby: suppress parser warningsnobu2016-02-192-18/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix r53748; the datafile includes non ASCIInaruse2016-02-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_regex_casefold.rb: Added data-based testing forduerst2016-02-062-0/+15
| | | | | | | | | | | | String#downcase :fold. * enc/unicode.c: Fixed a range error (lowest non-ASCII character affected by case operations is U+00B5, MICRO SIGN) * test/ruby/enc/test_case_mapping.rb: Explicit test for case folding of MICRO SIGN to Greek mu. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_regex_casefold.rb: Tests for three case foldingduerst2016-02-061-0/+101
| | | | | | | | | | | | primitives (mbc_case_fold, get_case_fold_codes_by_str, apply_all_case_fold) in the various encodings. Currently only known good encodings are tested to avoid test failures. For bug hunting, start by adding more encodings with generate_test_casefold encoding (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c, test/ruby/enc/test_case_mapping.rb: Implemented :foldduerst2016-02-061-0/+6
| | | | | | | | | option for String#downcase by using case folding data from regular expression engine, and added a few simple tests. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: added tests for :ascii option.duerst2016-02-051-0/+10
| | | | | | | (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: Any kind of option is now taking the new code path forduerst2016-01-171-2/+3
| | | | | | | | | | upcase/downcase/capitalize/swapcase. :lithuanian can be used for testing if no specific option is desired. * test/ruby/enc/test_case_mapping.rb: Adjusted to above. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Fixed a logical error and some comments.duerst2016-01-171-12/+43
| | | | | | | | * test/ruby/enc/test_case_mapping.rb: Made tests more general. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Removed artificial expansion for Turkic,duerst2016-01-171-4/+15
| | | | | | | | | | | added hand-coded support for Turkic, fixed logic for swapcase. * string.c: Made use of new case mapping code possible from upcase, capitalize, and swapcase (with :lithuanian as a guard). * test/ruby/enc/test_case_mapping.rb: Adjusted for above. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Artificial mapping to test buffer expansion code.duerst2016-01-161-1/+13
| | | | | | | | | * string.c: Fixed buffer expansion logic. * test/ruby/enc/test_case_mapping.rb: Tests for above. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c, enc/unicode.c: New code path as a preparation for Unicode-wideduerst2016-01-161-0/+11
| | | | | | | | | case mapping. The code path is currently guarded by the :lithuanian option to avoid accidental problems in daily use. * test/ruby/enc/test_case_mapping.rb: Test for above. * string.c: function 'check_case_options': fixed logical errors git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-01-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/enc/test_casing_options.rb: Tests for optionduerst2016-01-121-0/+81
| | | | | | | parsing/checking for upcase/downcase/capitalize/swapcase (see r53503; with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1615-0/+15
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enc/windows_1252.c: newnobu2015-12-111-0/+25
| | | | | | | * enc/windows_1252.c: separate from ISO-8859-1 to fix 0x80..0x9e range. [ruby-core:64049] [Bug #10097] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* euckr-tbl.rb: euro and registered signsnobu2014-08-191-0/+8
| | | | | | | * enc/trans/euckr-tbl.rb (EUCKR_TO_UCS_TBL): add missing euro and registered signs. [ruby-core:64452] [Bug #10149] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby: better assertionsnobu2013-12-132-7/+7
| | | | | | * test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_equal, assert_match, and so on.nobu2012-05-072-2/+2
| | | | | | | | | | | | * test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on. * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb, test/ruby/test_io_m17n.rb (assert_str_equal): ditto. * test/rubygems/test_gem_remote_fetcher.rb (assert_data_from_{server,proxy}): ditto. * test/test_pstore.rb (test_thread_safe): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]naruse2012-02-172-2/+2
| | | | | | | | | | https://github.com/k-takata/Onigmo cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h cp oniguruma.h cp tool/enc-unicode.rb cp -r enc/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_enc_uint_char): raise RangeError when added codepointnaruse2012-01-081-1/+1
| | | | | | | | | | | | | | | | | is invalid. [Feature #5855] [Bug #5863] [Bug #5864] * string.c (rb_str_concat): ditto. * string.c (rb_str_concat): set encoding as ASCII-8BIT when the string is US-ASCII and the argument is an integer greater than 127. * regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code. * enc/euc_jp.c (code_to_mbclen): ditto. * enc/shift_jis.c (code_to_mbclen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* indented.akr2010-03-121-337/+337
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* wrap tests by Emoji module.akr2010-03-121-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/EMOJI/*.src, enc/trans/emoji*, enc/x-emoji.c, ↵muraken2010-03-091-0/+430
| | | | | | | | test/ruby/enc/test_emoji.rb, tool/enc-emoji-citrus-gen.rb, tool/enc-emoji4unicode.rb, tool/jisx0208.rb, tool/test/test_jisx0208.rb: new encodings to support emoji charsets, which are used by Japanese mobile phones [ruby-dev:40528]. Thanks Yoji Shidara for a lot of contribution. * tool/transcode-tblgen.rb: modified for enc-emoji4unicode.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* avoid method redefinition.akr2010-02-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_gb18030.rb (test_left_adjust_char_head):nobu2009-10-291-26/+27
| | | | | | | String#chop no longer raises ArgumentError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_utf16.rb: feature changed in r20626.yugui2008-12-131-1/+1
| | | | | | | follows it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_casecmp): make the ordering consistent withakr2008-09-231-0/+13
| | | | | | | String#<=>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (string_cmp_ic): add text_end argument.akr2008-09-181-0/+4
| | | | | | | | (slow_search): call enclen with real string end. (map_search): add text_end argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * grapheme cluster implementation reverted. [ruby-dev:36375]akr2008-09-181-12/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: add "Error" suffix for Encoding exception classes.matz2008-09-181-10/+10
| | | | | | | | | | a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36346]. * encoding.c (Init_Encoding): rename EncodingCompatibilityError to Encoding::CompatibilityError. [ruby-dev:36366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_casecmp): don't use rb_enc_codepoint.akr2008-09-171-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add assertion message for previous commit.akr2008-09-151-6/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_quote): use rb_enc_mbcput to generate ASCIIakr2008-09-151-0/+6
| | | | | | | incompatible characters properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_m17n.rb: follow EncodingCompatibilityError.naruse2008-08-131-10/+10
| | | | | | | | * test/ruby/test_mixed_unicode_escapes.rb: ditto. * test/ruby/enc/test_utf16.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_koi8.rb: move from test/ruby/test_koi8.rb.mame2008-07-251-0/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc: moved tests for particular encodings.nobu2008-07-1612-0/+942
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e