summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n.rb
AgeCommit message (Collapse)Author
2012-02-08merge revision(s) 34236: [Backport #5890]naruse
* numeric.c (rb_enc_uint_char): raise RangeError when added codepoint 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/branches/ruby_1_9_3@34501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-11* numeric.c (rb_enc_uint_chr): fix message format. Bug#4869nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07cancel subversion backfire. sorrymatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07* gc.c (rb_gc_set_params): allow GC parameter configuration bymatz
environment variables. based on a patch from funny-falcon at https://gist.github.com/856296, but honors safe level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28* string.c (tr_trans): when the hash for multibyte repl is empty,naruse
tr is inverse mode, and a character doesn't much the table, the character should be replaced by last replacement. Bug #4449 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-15Add a test for the encoding of str_aset. [ruby-core:35142]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-15* encoding.c (rb_enc_compatible): change the rule for empty strings:naruse
remove the special treatment of the US-ASCII encoded empty string. Now Encoding.compatible? usually respect the encoding of the receiver. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-15* string.c (rb_enc_cr_str_buf_cat): remove special treatment ofnaruse
ASCII-8BIT receivers. * string.c (str_gsub): set initial encoding of the buffer as the same of the receiver. [ruby-core:35141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30* enc/emacs_mule.c (emacsmule_islead): 7bit range is also leadingnobu
byte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30* enc/emacs_mule.c (emacsmule_islead): fix inverse condition.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-01* string.c (rb_str_inspect): fix typo (not 0xFD but 0xFE).naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-30* string.c (rb_str_inspect): inspect as a dummy encoding stringnaruse
when a UTF-16/32 (not BE/LE) string does not have a BOM. Unicode and some RFCs say that a string labeld as UTF-16/32 doesn't have a BOM, it should be considered big endian. But many Windows programs generates little endian UTF-16 strings without a BOM. So String#inspect treats a string labeled UTF-16/32 withaout a BOM as a dummy encoding string. patched by Martin Duerst. [ruby-core:33461] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-22Fix r29848's test.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-22* string.c (rb_str_concat): set ENC_CODERANGE_VALID when thenaruse
receiver is 7BIT and the argument is non ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-09* regenc.c (onigenc_minimum_property_name_to_ctype):naruse
\p{...} should be case insensitive. [ruby-core:33000] * regenc.c (onigenc_property_list_add_property): ditto. * enc/euc_jp.c (init_property_list, property_name_to_ctype): to lowercase property names. * enc/shift_jis.c (init_property_list, property_name_to_ctype): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-03* string.c (rb_enc_cr_str_buf_cat): concatenation of validnobu
encoding string and invalid encoding string should result invalid encoding. [ruby-core:33027] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13move a non-combinational test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* numeric.c (int_chr): a codepoint of Ruby M17N must be 32bitnaruse
unsigned int; GB18030 uses MSB. Also note that OnigCodePoint is defined as uisigned int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31* string.c (rb_str_inspect): inspect as ASCII when the codepointnaruse
of a character in Unicode string is ASCII printable one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04Fix and add tests for String#inspect. [ruby-dev:41153]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26* ext/socket/extconf.rb: suppress a warning.akr
* ext/extmk.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-16Fix test when default_external is US-ASCII.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-10* string.c (rb_str_inspect): CHAR_ESC_LEN should be 13.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17* string.c (str_utf8_nth): fixed overrun. [ruby-core:26787]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17* test/ruby/test_m17n.rb: get rid of empty string interpolationsnobu
confusing ruby-mode.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29Escape as \x{XXXX} other than Unicode chars.naruse
* string.c (rb_str_inspect): escape as \x{XXXX} when the encoding is other than Unicode. [ruby-dev:39388] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29Refine tests arround String#inspect.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-29* string.c (rb_str_inspect): dump as \uXXXX when thenaruse
string is in Unicode. [ruby-dev:39388] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-14* re.c (rb_reg_preprocess_dregexp): change Exception class tonaruse
RegexpError. * test/ruby/test_m17n.rb (test_regexp_usascii): follow above. * test/ruby/test_m17n.rb (test_regexp_embed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-11* encoding.c (rb_enc_compatible): If a string is empty andnaruse
other's encoding is US-ASCII, returns the empty string's encoding. [ruby-list:46274] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13Follow tests for changes of ENV's encoding.naruse
* test/ruby/test_m17n.rb (TestM17N#test_env): the encoding of ENV is now locale encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24* test/ruby/test_hash.rb (TestHash::test_equal2): recursive hashesmatz
are handled properly now. ref: [ruby-core:23402] * test/ruby/test_m17n.rb (TestM17N#test_sprintf_p): test fixed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-08* string.c (rb_str_dump): buffer length plus one byte for nullmame
terminator. [ruby-dev:38294] * test/ruby/test_m17n.rb (test_str_dump): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* string.c (rb_str_force_encoding): should clear coderange at changingnobu
encoding. [ruby-core:22437] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13* test/ruby/test_m17n.rb: feature changed in r20626.yugui
follows it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-02* string.c (rb_str_sub_bang): fix coderange.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19* parse.y: strings which contain only US-ASCII don't force to havenaruse
US-ASCII encoding. [ruby-dev:36400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18* grapheme cluster implementation reverted. [ruby-dev:36375]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18* transcode.c: add "Error" suffix for Encoding exception classes.matz
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
2008-09-16* include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr
argument for mbc_to_code. (ONIGENC_MBC_TO_CODE): provide NULL for precise_ret. (ONIGENC_MBC_PRECISE_CODEPOINT): defined. * include/ruby/encoding.h (rb_enc_mbc_precise_codepoint): defined. * regenc.h (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * regenc.c (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * string.c (count_utf8_lead_bytes_with_word): removed. (str_utf8_nth): removed. (str_utf8_offset): removed. (str_strlen): UTF-8 codepoint oriented optimization removed. (rb_str_substr): ditto. (enc_succ_char): use rb_enc_mbc_precise_codepoint. (enc_pred_char): ditto. (rb_str_succ): ditto. * encoding.c (rb_enc_ascget): check length with rb_enc_mbc_precise_codepoint. (rb_enc_codepoint): use rb_enc_mbc_precise_codepoint. * regexec.c (string_cmp_ic): add text_end argument. (match_at): check end of character after exact string matches. * enc/utf_8.c (graphme_table): defined for extended graphme cluster boundary. (grapheme_cmp): defined. (get_grapheme_properties): defined. (grapheme_boundary_p): defined. (MAX_BYTES_LENGTH): defined. (comb_char_enc_len): defined. (mbc_to_code0): extracted from mbc_to_code. (mbc_to_code): use mbc_to_code0. (left_adjust_combchar_head): defined. (utf_8): use a extended graphme cluster as a unit. * enc/unicode.c (onigenc_unicode_mbc_case_fold): use ONIGENC_MBC_PRECISE_CODEPOINT to extract codepoints. (onigenc_unicode_get_case_fold_codes_by_str): ditto. * enc/euc_jp.c (mbc_to_code): follow mbc_to_code field change. use onigenc_mbn_mbc_to_code. * enc/shift_jis.c (mbc_to_code): ditto. * enc/emacs_mule.c (mbc_to_code): ditto. * enc/gbk.c (gbk_mbc_to_code): follow mbc_to_code field and onigenc_mbn_mbc_to_code change. * enc/cp949.c (cp949_mbc_to_code): ditto. * enc/big5.c (big5_mbc_to_code): ditto. * enc/euc_tw.c (euctw_mbc_to_code): ditto. * enc/euc_kr.c (euckr_mbc_to_code): ditto. * enc/gb18030.c (gb18030_mbc_to_code): ditto. * enc/utf_32be.c (utf32be_mbc_to_code): follow mbc_to_code field change. * enc/utf_16be.c (utf16be_mbc_to_code): ditto. * enc/utf_32le.c (utf32le_mbc_to_code): ditto. * enc/utf_16le.c (utf16le_mbc_to_code): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15* encoding.c (rb_enc_compatible): accepst other than strings andnaruse
regexps. [ruby-core:18595] * encoding.c (rb_enc_get_index): works files and encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29* encoding.c (enc_compatible_p): add SPECIAL_CONST_P check.naruse
* test/ruby/test_m17n.rb (test_compatible): fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13* test/ruby/test_m17n.rb: follow EncodingCompatibilityError.naruse
* 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
2008-08-01* parse.y (parser_yylex): removed an useless conditional, and magicyugui
comment are ignored unless at the first of line. * test/ruby/test_m17n.rb (test_magic_comment_vim): added. * test/ruby/test_m17n.rb (test_magic_comment_at_variaous_positions): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04* re.c (unescape_nonascii): add has_property argument not toakr
raise error by /\p{Hiragana}\u{3042}/ in EUC-JP script. (rb_reg_preprocess): use has_property argument to make regexp encoding fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04* re.c (unescape_nonascii): make regexp fixed_encoding if \p is used.akr
fixed [ruby-core:17279]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* bootstraptest/test_knownbug.rb: move solved tests.ko1
* bootstraptest/test_eval.rb, test_literal.rb, test_syntax.rb, test_thread.rb: ditto. * test/ruby/test_m17n.rb, test_proc.rb, test_sprintf.rb, test_string.rb, test/ruby/test_struct.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15* test/ruby/test_string.rb: add tests to achieve over 90% testmame
coverage of string.c. * test/ruby/test_m17n.rb: ditto. * test/ruby/test_symbol.rb: ditto. * test/ruby/test_pack.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-15* string.c (tr_find): String#delete returned wrong result when multiplemame
utf-8 arguments are passed. * test/ruby/test_m17n.rb (test_delete): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e