summaryrefslogtreecommitdiff
path: root/test/json
AgeCommit message (Collapse)Author
2020-12-22Prepare to release json-2.5.0Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3975
2020-12-21[json] Make json Ractor safeKenta Murata
2020-12-21[json] Stop using prototype objectsKenta Murata
2020-12-04SortedSet was removed at a3db08d7b6ff119223f77e3df00b4f6deac971e2Hiroshi SHIBATA
2020-10-21test/json/json_parser_test.rb: suppress warningsYusuke Endoh
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201021T123003Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:227: warning: ambiguous first argument; put parentheses or a space even after `-' operator /home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:228: warning: ambiguous first argument; put parentheses or a space even after `-' operator ```
2020-10-20strip trailing spaces [ci skip]Nobuyoshi Nakada
2020-10-20Fix an issue with generate_pretty and empty objects in the Ruby and Java ↵Chris Seaton
implementations
2020-10-20Implement a freeze: parser optionJean Boussier
If set to true all parsed objects will be immediately frozen, and strings will be deduplicated if the Ruby implementation allows it.
2020-09-30Remove unneeded `begin` and `end`Kazuhiro NISHIYAMA
2020-09-30Fix `Leaked tempfile`sKazuhiro NISHIYAMA
http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20200930T033004Z.diff.html.gz ``` [n/n] JSONCommonInterfaceTest#test_load = <elapsed> s [n/n] JSONCommonInterfaceTest#test_load_file = <elapsed> s +Leaked tempfile: JSONCommonInterfaceTest#test_load_file: #<Tempfile:<build-dir>/tmp/20200930-7601-ptnv6i (closed)> [n/n] JSONCommonInterfaceTest#test_load_file! = <elapsed> s +Leaked tempfile: JSONCommonInterfaceTest#test_load_file!: #<Tempfile:<build-dir>/tmp/20200930-7601-1la6m9 (closed)> [n/n] JSONCommonInterfaceTest#test_load_file_with_option = <elapsed> s +Leaked tempfile: JSONCommonInterfaceTest#test_load_file_with_option: #<Tempfile:<build-dir>/tmp/20200930-7601-blf9hz (closed)> [n/n] JSONCommonInterfaceTest#test_load_file_with_option! = <elapsed> s +Leaked tempfile: JSONCommonInterfaceTest#test_load_file_with_option!: #<Tempfile:<build-dir>/tmp/20200930-7601-b5gsdb (closed)> ```
2020-09-28Remove unnecessary executable bit [ci skip]Kazuhiro NISHIYAMA
2020-09-25t/json/json_common_interface_test.rb: fix wrong indentationYusuke Endoh
to prevent: ``` test/json/json_common_interface_test.rb:182: warning: mismatched indentations at 'end' with 'def' at 169 ```
2020-09-25Extract assert assertion to assert_include and assert_not_include.Hiroshi SHIBATA
2020-09-25assert_true is not provided by test-unitHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25Fix pure parser with unclosed arrays / objects [Fix #314]Marc-Andre Lafortune
Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[test] properly 'skip' test on JRubyKarol Bucek
an early return still caused ensure to execute, setting JSON constant to `nil` for later tests! Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25[flori/json] Add `load_file` and `load_file!` methods, with tests. Fixes ↵Keith Bennett
issue #386. https://github.com/flori/json/commit/0be363c99b Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-09-25Add an option to escape forward slash characterJean Boussier
Squashed commit of the following: commit 26d181059989279a79c433cedcd893b4f52e42ee Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Tue Sep 15 21:17:34 2015 +0000 add config options for escape_slash commit fa282334051b16df91ca097dd7304b46f3bc7719 Author: Francois Chagnon <francois.chagnon@jadedpixel.com> Date: Mon Feb 9 21:09:33 2015 +0000 add forward slash to escape character Notes: Merged: https://github.com/ruby/ruby/pull/3581
2020-07-03test/json/json_fixtures_test.rb: Prevent an "out of range" warningYusuke Endoh
``` /home/mame/work/ruby/.ext/common/json/common.rb:263: warning: Float 23456789012E666 out of range ```
2020-07-03Reintroduce c565dfb09ad7d55fa671f65cea7088a914bf1931Yusuke Endoh
2020-07-01Merge json-2.3.1 from flori/jsonHiroshi SHIBATA
2020-07-01[flori/json] Fix test that wasn't testing anythingMarc-Andre Lafortune
https://github.com/flori/json/commit/d5c6566b41
2020-03-24test/json/test_helper.rb: Do not add a relative path to $LOAD_PATHYusuke Endoh
... because it conflicts with test/ruby/test_m17n.rb. An exception `incompatible character encodings: UTF-8 and UTF-16BE` occurs when: * a non-existence relative path is added to $LOAD_PATH, * ASCII-incompatible encoding is set to default_external, and * some file is loaded. ``` $LOAD_PATH << "no_existing_dir" Encoding.default_external = Encoding::UTF_16BE load "dummy.rb" #=> incompatible character encodings: UTF-8 and UTF-16BE ``` This issue can be actually observed by a combination of out-of-place build and the following command: make test-all TESTS="json ruby/m17n -n test_object_inspect_external" http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 ASCII-incompatible default external encoding assumes that the cwd is the encoding, and it is attempted to beconcatenated with a non-existence relative LOAD_PATH UTF-8 string, which causes the exception. This changeset avoids a relative path.
2019-12-12Import json-2.3.0 from flori/jsonHiroshi SHIBATA
2019-11-29Skip useless testNobuyoshi Nakada
`JSONGeneratorTest#test_remove_const_seg` is meaningful only for the extension library version, but nonsense for pure ruby version.
2019-10-17Look up constant instead of caching in a globalAaron Patterson
The global can go bad if the compactor runs, so we need to look up the constant instead of caching it in a global.
2019-10-14[flori/json] fix test as reported in #343Florian Frank
https://github.com/flori/json/commit/565c72ba9e
2019-10-14[flori/json] Fixed unexpected illegal/malformed utf-8 errorNobuyoshi Nakada
flori/json@c34d01ff6a18dac04a90b2e0f820cdb1d5c7e1b2 does not consider US-ASCII compatible but non-UTF-8 encodings, and causes an error in RDoc tests. https://github.com/flori/json/commit/4f471bf590
2019-06-01Ignore warnings about ambiguous first argument with the negative integer.Hiroshi SHIBATA
2019-06-01Ignore warnings about ambiguous first argument of regexp with assert match.Hiroshi SHIBATA
2019-02-23Merge json-2.2.0 from flori/json.hsbt
https://github.com/flori/json/releases/tag/v2.2.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-02Fix JSON::Parser against bigdecimal updatesmrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16require 'bigdecimal'ko1
* test/json/json_parser_test.rb: this test needs bigdecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-16Merge json-2.1.0 from https://github.com/flori/jsonhsbt
https://github.com/flori/json/blob/master/CHANGES.md#2017-04-18-210 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12Use `assert_raise` instead of `assert_raises`.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12Merge json-2.0.4.hsbt
* https://github.com/flori/json/releases/tag/v2.0.4 * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-09json_generator_test.rb: no Bignumnobu
* test/json/json_generator_test.rb (test_broken_bignum): get rid of use of Bignum, obsolete name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-01* ext/json/*, test/json/json_parser_test.rb: Update json-2.0.2.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-13* test/json/json_common_interface_test.rb: use assert_raise instead ofhsbt
assert_raises. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-13* test/lib/test/unit.rb: added test files with `_test` suffix for jsonhsbt
upstream. * test/json: merge original test files from json upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-05* ext/json/*, test/json/*: Update json-2.0.1.hsbt
Changes of 2.0.0: https://github.com/flori/json/blob/f679ebd0c69a94e3e70a897ac9a229f5779c2ee1/CHANGES.md#2015-09-11-200 Changes of 2.0.1: https://github.com/flori/json/blob/f679ebd0c69a94e3e70a897ac9a229f5779c2ee1/CHANGES.md#2016-07-01-201 [Feature #12542][ruby-dev:49706][fix GH-1395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17Use Integer instead of Fixnum and Bignum.akr
* object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c, lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb, lib/rubygems/specification.rb, lib/uri/generic.rb, bootstraptest/test_eval.rb, basictest/test.rb, test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb, test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb, test/csv/test_data_converters.rb, test/date/test_date.rb, test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb, test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb, test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb, test/ruby/test_bignum.rb, test/ruby/test_case.rb, test/ruby/test_class.rb, test/ruby/test_complex.rb, test/ruby/test_enum.rb, test/ruby/test_eval.rb, test/ruby/test_iseq.rb, test/ruby/test_literal.rb, test/ruby/test_math.rb, test/ruby/test_module.rb, test/ruby/test_numeric.rb, test/ruby/test_range.rb, test/ruby/test_rational.rb, test/ruby/test_refinement.rb, test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb, test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb, test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
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
2015-10-30use assert_raisenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-28generator.c: allocate structs with wrappernobu
* ext/json/generator/generator.c (cState_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-28parser.rl: allocate structs with wrappernobu
* ext/json/parser/parser.rl (cJSON_parser_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-18parser.rl: rb_enc_raisenobu
* ext/json/parser/parser.rl: raise with messages in UTF-8 encoding. [ruby-core:67386] [Bug #10705] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* ext/json/*, test/json/*: Reverted r50231. Because it's not works withhsbt
cross-compile environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* ext/json/*, test/json/*, defs/default_gems: Gemify JSON library.hsbt
[fix GH-867][Feature #11057] * test/ruby/test_extlibs.rb: removed json gem from existence extentions. * gems/bundled_gems: added json gem into bundled gem. * lib/rdoc/rubygems_hook.rb: ignored no json environment. * lib/rubygems/test_case.rb, test/rubygems/*: ditto. * lib/rdoc/test_case.rb, test/rdoc/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11generator.c: fix infinite recursionnobu
* ext/json/generator/generator.c (generate_json): get rid of unnecessary recursive calls which can cause infinite recursion. T_STRING may not have rb_cString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e