summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #483 from notEthan/unicode_mixedHiroshi SHIBATA2022-06-141-0/+4
|\ | | | | bugfix json/pure mixing escaped with literal unicode raises Encoding::CompatibilityError
| * test parsing of unicode, mixing literal characters with escapedEthan2022-02-081-0/+4
| |
* | Fix parser bug for empty string allocationAndrew Bromwich2022-04-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
* Remove unknown keyword arg from DateTime.parseCharles Oliver Nutter2021-12-011-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.
* Use better condition for the old ruby versionsHiroshi SHIBATA2020-12-281-2/+2
|
* Skip tests with JRuby platformHiroshi SHIBATA2020-12-221-1/+1
|
* Guard for Ruby 3.0Hiroshi SHIBATA2020-12-221-1/+1
|
* Change the condition for RactorHiroshi SHIBATA2020-12-221-6/+1
|
* skip ractor_test with JRubyHiroshi SHIBATA2020-12-221-0/+1
|
* Import test assertions from ruby/rubyHiroshi SHIBATA2020-12-224-0/+1154
|
* [json] Make json Ractor safeKenta Murata2020-12-221-0/+34
|
* [json] Stop using prototype objectsKenta Murata2020-12-221-36/+3
|
* SortedSet was removed at a3db08d7b6ff119223f77e3df00b4f6deac971e2Hiroshi SHIBATA2020-12-151-4/+0
|
* t/json/json_common_interface_test.rb: fix wrong indentationYusuke Endoh2020-11-121-1/+1
| | | | | | | | to prevent: ``` test/json/json_common_interface_test.rb:182: warning: mismatched indentations at 'end' with 'def' at 169 ```
* Remove unneeded `begin` and `end`Kazuhiro NISHIYAMA2020-11-121-6/+4
|
* Fix `Leaked tempfile`sKazuhiro NISHIYAMA2020-11-121-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)> ```
* Extract assert assertion to assert_include and assert_not_include.Hiroshi SHIBATA2020-11-121-1/+2
|
* assert_true is not provided by test-unitHiroshi SHIBATA2020-11-121-1/+1
|
* Remove unnecessary executable bit [ci skip]Kazuhiro NISHIYAMA2020-11-121-0/+0
|
* test/json/json_parser_test.rb: suppress warningsYusuke Endoh2020-11-121-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-11-121-1/+1
|
* Merge pull request #447 from Shopify/global-freeze-optionHiroshi SHIBATA2020-10-201-0/+21
|\ | | | | Implement a freeze: parser option
| * Implement a freeze: parser optionJean Boussier2020-09-151-0/+21
| | | | | | | | | | | | | | If set to true all parsed objects will be immediately frozen, and strings will be deduplicated if the Ruby implementation allows it.
* | Fix an issue with generate_pretty and empty objects in the Ruby and Java ↵Chris Seaton2020-10-071-0/+5
|/ | | | implementations
* Merge pull request #425 from marcandre/fix_pure_parserHiroshi SHIBATA2020-08-144-0/+4
|\ | | | | Fix pure parser with unclosed arrays / objects [Fix #314]
| * Fix pure parser with unclosed arrays / objects [Fix #314]Marc-Andre Lafortune2020-06-304-0/+4
| |
* | Merge pull request #405 from Shopify/escape-slash-2.3.0NARUSE, Yui2020-07-312-0/+11
|\ \ | | | | | | Add an option to escape forward slash character
| * | Add an option to escape forward slash characterJean Boussier2020-07-042-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] properly 'skip' test on JRubyKarol Bucek2020-07-071-2/+1
|/ / | | | | | | | | an early return still caused ensure to execute, setting JSON constant to `nil` for later tests!
* | Merge pull request #432 from mame/prevent-warning-during-testHiroshi SHIBATA2020-07-031-0/+3
|\ \ | | | | | | test/json/json_fixtures_test.rb: Prevent an "out of range" warning
| * | test/json/json_fixtures_test.rb: Prevent an "out of range" warningYusuke Endoh2020-07-031-0/+3
| | | | | | | | | | | | | | | | | | | | | with `make test-all RUBYOPT=-w` ``` /home/mame/work/ruby/.ext/common/json/common.rb:263: warning: Float 23456789012E666 out of range ```
* | | Do not add a relative path to $LOAD_PATHYusuke Endoh2020-07-031-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.
* | Add `load_file` and `load_file!` methods, with tests. Fixes issue #386.Keith Bennett2020-06-301-0/+56
|/
* Fix test that wasn't testing anythingMarc-Andre Lafortune2020-06-251-1/+6
|
* Make tests green on jrubyFlorian Frank2019-12-101-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.
* Fix JSON::Parser against bigdecimal updatesmrkn2019-10-311-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [flori/json] Fixed unexpected illegal/malformed utf-8 errorNobuyoshi Nakada2019-10-311-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 of regexp with assert match.Hiroshi SHIBATA2019-10-311-3/+3
|
* Ignore warnings about ambiguous first argument with the negative integer.Hiroshi SHIBATA2019-10-311-12/+12
|
* Look up constant instead of caching in a globalAaron Patterson2019-10-311-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.
* fix test as reported in #343Florian Frank2017-12-211-1/+1
|
* JSON marshalling support for Set and SortedSetJosh Kline2017-10-041-0/+10
|
* Merge branch 'master' of github.com:flori/jsonFlorian Frank2017-06-211-0/+1
|\
| * Added missing bigdecimal for its testSHIBATA Hiroshi2017-06-161-0/+1
| |
* | simplecov breaks testing => removedFlorian Frank2017-06-211-4/+0
|/
* Use assert_raiseFlorian Frank2017-04-181-2/+2
|
* Merge branch 'test_bigdecimal_parsing' of https://github.com/xb/jsonFlorian Frank2017-04-181-0/+5
|\
| * Actually test BigDecimal parsing.Xuân Baldauf2017-03-191-0/+5
| |
* | Raise exceptionFlorian Frank2017-04-181-0/+2
|/ | | | for incomplete unicode surrogates/character escape sequences