aboutsummaryrefslogtreecommitdiffstats
path: root/test/json
Commit message (Collapse)AuthorAgeFilesLines
* [flori/json] test parsing of unicode, mixing literal characters with escapedEthan2022-07-291-0/+4
| | | | https://github.com/flori/json/commit/82fe866da2
* [flori/json] Fix parser bug for empty string allocationAndrew Bromwich2022-05-201-0/+1
| | | | | | | | | | When `HAVE_RB_ENC_INTERNED_STR` is enabled it is possible to pass through a null pointer to `rb_enc_interned_str` resulting in a segfault Fixes #495 https://github.com/flori/json/commit/b59368a8c2
* [flori/json] Remove unknown keyword arg from DateTime.parseCharles Oliver Nutter2022-05-201-1/+1
| | | | | | | | | This snuck in while addding tests for the `create_additions` feature. Caught by JRuby when we added the `limit` option to the Date/DateTime parsing methods, which causes this to be rejected as an unknown keyword. https://github.com/flori/json/commit/b1007dff66
* Prepare to release json-2.5.0Hiroshi SHIBATA2020-12-222-6/+2
|
* [json] Make json Ractor safeKenta Murata2020-12-211-0/+34
|
* [json] Stop using prototype objectsKenta Murata2020-12-211-36/+3
|
* SortedSet was removed at a3db08d7b6ff119223f77e3df00b4f6deac971e2Hiroshi SHIBATA2020-12-041-4/+0
|
* test/json/json_parser_test.rb: suppress warningsYusuke Endoh2020-10-211-2/+2
| | | | | | | | 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 ```
* strip trailing spaces [ci skip]Nobuyoshi Nakada2020-10-201-1/+1
|
* Fix an issue with generate_pretty and empty objects in the Ruby and Java ↵Chris Seaton2020-10-201-0/+5
| | | | implementations
* Implement a freeze: parser optionJean Boussier2020-10-201-0/+21
| | | | | | | If set to true all parsed objects will be immediately frozen, and strings will be deduplicated if the Ruby implementation allows it.
* Remove unneeded `begin` and `end`Kazuhiro NISHIYAMA2020-09-301-6/+4
|
* Fix `Leaked tempfile`sKazuhiro NISHIYAMA2020-09-301-15/+3
| | | | | | | | | | | | | | | 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)> ```
* Remove unnecessary executable bit [ci skip]Kazuhiro NISHIYAMA2020-09-281-0/+0
|
* t/json/json_common_interface_test.rb: fix wrong indentationYusuke Endoh2020-09-251-1/+1
| | | | | | | | to prevent: ``` test/json/json_common_interface_test.rb:182: warning: mismatched indentations at 'end' with 'def' at 169 ```
* Extract assert assertion to assert_include and assert_not_include.Hiroshi SHIBATA2020-09-251-1/+2
|
* assert_true is not provided by test-unitHiroshi SHIBATA2020-09-251-1/+1
|
* Fix pure parser with unclosed arrays / objects [Fix #314]Marc-Andre Lafortune2020-09-254-0/+4
|
* [test] properly 'skip' test on JRubyKarol Bucek2020-09-251-2/+1
| | | | | an early return still caused ensure to execute, setting JSON constant to `nil` for later tests!
* [flori/json] Add `load_file` and `load_file!` methods, with tests. Fixes ↵Keith Bennett2020-09-251-0/+56
| | | | | | issue #386. https://github.com/flori/json/commit/0be363c99b
* Add an option to escape forward slash characterJean Boussier2020-09-252-0/+11
| | | | | | | | | | | | | | | | 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
* test/json/json_fixtures_test.rb: Prevent an "out of range" warningYusuke Endoh2020-07-031-0/+3
| | | | | | ``` /home/mame/work/ruby/.ext/common/json/common.rb:263: warning: Float 23456789012E666 out of range ```
* Reintroduce c565dfb09ad7d55fa671f65cea7088a914bf1931Yusuke Endoh2020-07-031-3/+3
|
* Merge json-2.3.1 from flori/jsonHiroshi SHIBATA2020-07-011-3/+3
|
* [flori/json] Fix test that wasn't testing anythingMarc-Andre Lafortune2020-07-011-1/+6
| | | | https://github.com/flori/json/commit/d5c6566b41
* test/json/test_helper.rb: Do not add a relative path to $LOAD_PATHYusuke Endoh2020-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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.
* Import json-2.3.0 from flori/jsonHiroshi SHIBATA2019-12-121-0/+1
|
* Skip useless testNobuyoshi Nakada2019-11-291-1/+1
| | | | | `JSONGeneratorTest#test_remove_const_seg` is meaningful only for the extension library version, but nonsense for pure ruby version.
* Look up constant instead of caching in a globalAaron Patterson2019-10-171-0/+37
| | | | | The global can go bad if the compactor runs, so we need to look up the constant instead of caching it in a global.
* [flori/json] fix test as reported in #343Florian Frank2019-10-141-1/+1
| | | | https://github.com/flori/json/commit/565c72ba9e
* [flori/json] Fixed unexpected illegal/malformed utf-8 errorNobuyoshi Nakada2019-10-141-0/+6
| | | | | | | | 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
* Ignore warnings about ambiguous first argument with the negative integer.Hiroshi SHIBATA2019-06-011-12/+12
|
* Ignore warnings about ambiguous first argument of regexp with assert match.Hiroshi SHIBATA2019-06-011-3/+3
|
* Merge json-2.2.0 from flori/json.hsbt2019-02-232-4/+10
| | | | | | 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
* Fix JSON::Parser against bigdecimal updatesmrkn2018-12-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* require 'bigdecimal'ko12017-06-161-0/+1
| | | | | | | * 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
* Merge json-2.1.0 from https://github.com/flori/jsonhsbt2017-06-161-0/+5
| | | | | | 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
* Use `assert_raise` instead of `assert_raises`.hsbt2017-04-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge json-2.0.4.hsbt2017-04-122-0/+2
| | | | | | | * 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
* json_generator_test.rb: no Bignumnobu2016-09-091-2/+3
| | | | | | | * 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
* * ext/json/*, test/json/json_parser_test.rb: Update json-2.0.2.hsbt2016-08-011-1/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/json/json_common_interface_test.rb: use assert_raise instead ofhsbt2016-07-131-3/+3
| | | | | | assert_raises. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/test/unit.rb: added test files with `_test` suffix for jsonhsbt2016-07-1311-62/+35
| | | | | | | 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
* * ext/json/*, test/json/*: Update json-2.0.1.hsbt2016-07-0514-755/+780
| | | | | | | | 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
* Use Integer instead of Fixnum and Bignum.akr2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add frozen_string_literal: false for all filesnaruse2015-12-169-0/+9
| | | | | | 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
* use assert_raisenobu2015-10-305-54/+54
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generator.c: allocate structs with wrappernobu2015-05-281-0/+13
| | | | | | | | * 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
* parser.rl: allocate structs with wrappernobu2015-05-281-0/+13
| | | | | | | | * 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
* parser.rl: rb_enc_raisenobu2015-04-181-0/+10
| | | | | | | * 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