summaryrefslogtreecommitdiff
path: root/test/psych
AgeCommit message (Collapse)Author
2024-01-18[ruby/psych] Add :stringify_names option to convert symbol keys to string ↵Robert Schulze
for dumping https://github.com/ruby/psych/commit/3d051d89aa
2024-01-17[ruby/psych] issue #443: drop special tests for y, Y, n, N since they ↵Colin Kelley
covered in the more general test https://github.com/ruby/psych/commit/6750b35402
2024-01-17[ruby/psych] issue #443: quote Y and N when dumpingColin Kelley
https://github.com/ruby/psych/commit/93c8fb443a
2023-12-25[ruby/psych] Typofix by misspellHiroshi SHIBATA
https://github.com/ruby/psych/commit/fc9ca15999
2023-12-19[ruby/psych] Use `assert_same` in tests where applicableAlexander Momchilov
https://github.com/ruby/psych/commit/0dc25a9d6a
2023-10-02[ruby/psych] Add test for code_point_limitCharles Oliver Nutter
Only supported on JRuby currently. https://github.com/ruby/psych/commit/0c1754eefe
2023-07-18[ruby/psych] Skip BigDecimal tests when it's missing to loadHiroshi SHIBATA
https://github.com/ruby/psych/commit/e1dbfae7a6
2023-06-12[ruby/psych] Prefer `assert_include` for simple stringsNobuyoshi Nakada
https://github.com/ruby/psych/commit/33024ce2b0
2023-01-31[ruby/psych] Update for stricter 1.2 syntaxCharles Oliver Nutter
This allows these tests to pass on SnakeYAML Engine -- which is a 1.2-only YAML library -- while still passing on libyaml 1.1. https://github.com/ruby/psych/commit/f44269fc9b
2023-01-23[ruby/psych] Fix RestrictedYAMLTree allowing the Symbol class should allow ↵Jean Boussier
all symbols Ref: https://github.com/ruby/psych/pull/495 That's how it works for `safe_load`: ```ruby >> YAML.safe_load(':foo', permitted_classes: [Symbol]) => :foo ``` So `safe_dump` should mirror that. https://github.com/ruby/psych/commit/592a75a656
2023-01-11[ruby/psych] Get rid of anonymous eval callsJean Boussier
Things declared in anonymous eval are always annoying to locate. https://github.com/ruby/psych/commit/38871ad4e5
2022-12-22Always issue deprecation warning when calling Regexp.new with 3rd positional ↵Jeremy Evans
argument Previously, only certain values of the 3rd argument triggered a deprecation warning. First step for fix for bug #18797. Support for the 3rd argument will be removed after the release of Ruby 3.2. Fix minor fallout discovered by the tests. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6976
2022-12-09Merge Psych-5.0.1Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/6890
2022-09-07[ruby/psych] Dump Date/DateTime as proleptic Gregorian date as well as TimeNobuyoshi Nakada
Fix ruby/psych#572 https://github.com/ruby/psych/commit/92304269bc
2022-08-09[ruby/psych] Raise specific error when an anchor isn't definedAlexander Momchilov
https://github.com/ruby/psych/commit/98fbd5247a
2022-08-09[ruby/psych] Update to squiggly heredocs in the fileAlexander Momchilov
https://github.com/ruby/psych/commit/42b43de997
2022-08-09[ruby/psych] Add test for missing anchorAlexander Momchilov
https://github.com/ruby/psych/commit/5f08137ae6
2022-08-09[ruby/psych] Add test for anchor reuseAlexander Momchilov
The spec calls this a "reuse" of an anchor https://yaml.org/spec/1.2.2/#71-alias-nodes https://github.com/ruby/psych/commit/57e3b70a56
2022-08-09[ruby/psych] Raise specific error when aliases are not enabledAlexander Momchilov
https://github.com/ruby/psych/commit/0c11ddcf46
2022-08-09[ruby/psych] Don't hardcode expected alias namesAlexander Momchilov
https://github.com/ruby/psych/commit/b9ab19094f
2022-08-09[ruby/psych] Test that recursive refs dump as aliasesAlexander Momchilov
https://github.com/ruby/psych/commit/d9f7289190
2022-08-09[ruby/psych] Clarify tests about parsing aliasesAlexander Momchilov
https://github.com/ruby/psych/commit/0bc30cb4cb
2022-01-22[ruby/psych] Add strict_integer option to parse numbers with commas as stringsSeth Boyles
Authored-by: Seth Boyles <sethboyles@gmail.com> https://github.com/ruby/psych/commit/75bebb37b8
2021-09-09test/psych/test_scalar_scanner.rb: Prevent a warningYusuke Endoh
``` [ 4696/20990] TestAst#test_ranges:test/psych/test_scalar_scanner.rb(none):138: warning: ambiguous first argument; put parentheses or a space even after `-' operator ``` http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20210909T123007Z.log.html.gz
2021-08-31[ruby/psych] Replace A-Za-z with [:alpha:]jory-graham
https://github.com/ruby/psych/commit/8ec36494fb
2021-08-31[ruby/psych] Add quotes to the strings "y" and "n"Aaron Patterson
'y' and 'n' are kind of ambiguous. Syck treated y and n literals in YAML documents as strings. But this is not what the YAML 1.1 spec says. YAML 1.1 says they should be treated as booleans. When we're dumping documents, we know it's a string, so adding quotes will eliminate the "ambiguity" in the emitted document Fixes #443 https://github.com/ruby/psych/commit/6a1c30634e
2021-08-31[ruby/psych] add more testsAlexandr Opak
https://github.com/ruby/psych/commit/8f71222bf3
2021-08-31[ruby/psych] fix typoAlexandr Opak
https://github.com/ruby/psych/commit/ebb0cbded1
2021-08-31[ruby/psych] fix parsing integer values with '_' at the endAlexandr Opak
https://github.com/ruby/psych/commit/e0bb853014
2021-08-31[ruby/psych] Improve float scalar scannerTomer Brisker
Previously, `+.inf` was not handled correctly. Additionally, the regexp was checking for inf and NaN, even though these cases are handled earlier in the condition. Added a few tests to ensure handling some missing cases. https://github.com/ruby/psych/commit/6e0e7a1e9f
2021-07-29[ruby/psych] require 'delegate' explicitlyPavel Rosický
https://github.com/ruby/psych/commit/51a9ce13db
2021-06-08[ruby/psych] Fix the test that does not work with libyaml-0.1.7Yusuke Endoh
https://github.com/ruby/psych/commit/542cf9754f
2021-06-07Do not use YAML module in tests of PsychHiroshi SHIBATA
2021-06-07Use assert_raise instead of assert_raisesHiroshi SHIBATA
2021-06-07[ruby/psych] Implement YAML.safe_dump to make safe_load more usable.Jean Boussier
In case where Psych is used as a two way serializers, e.g. to serialize some cache or config, it is preferable to have the same restrictions on both load and dump. Otherwise you might dump and persist some objects payloads that you later won't be able to read. https://github.com/ruby/psych/commit/441958396f
2021-05-26Suppress debug messageNobuyoshi Nakada
2021-05-18test/psych/test_coder.rb: Suppress non-parenthesis warningsYusuke Endoh
http://rubyci.s3.amazonaws.com/debian9/ruby-master/log/20210518T093002Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20210518T093002Z/ruby/test/psych/test_coder.rb:277: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator ```
2021-05-17Make the test pass with the old libyamlYusuke Endoh
I have no idea what result is right, but it fails with libyaml 0.1.7 (bundled with Ubuntu 18.04) anyway.
2021-05-17assert_equal accepts an expected value as the first argumentYusuke Endoh
2021-05-17[ruby/psych] remove deprecated interfaceAaron Patterson
https://github.com/ruby/psych/commit/0767227051
2021-05-17[ruby/psych] Introduce `Psych.unsafe_load`Aaron Patterson
In future versions of Psych, the `load` method will be mostly the same as the `safe_load` method. In other words, the `load` method won't allow arbitrary object deserialization (which can be used to escalate to an RCE). People that need to load *trusted* documents can use the `unsafe_load` method. This commit introduces the `unsafe_load` method so that people can incrementally upgrade. For example, if they try to upgrade to 4.0.0 and something breaks, they can downgrade, audit callsites, change to `safe_load` or `unsafe_load` as required, and then upgrade to 4.0.0 smoothly. https://github.com/ruby/psych/commit/cb50aa8d3f
2021-05-17[ruby/psych] Fix symabolize_name with non-string keysJean Boussier
https://github.com/ruby/psych/commit/1c5c29e81f
2021-05-17[ruby/psych] feat: allow scalars and sequences to be styled when dumpedJeremy Ebler
https://github.com/ruby/psych/commit/546154ddb7
2021-05-10[ruby/psych] Fix custom marshalization with symbolize_names: trueJean Boussier
https://github.com/ruby/psych/commit/ee26f26ab5
2021-05-10[ruby/psych] Use assert_raise instead of assert_raisesHiroshi SHIBATA
https://github.com/ruby/psych/commit/e6ad12b4e1
2021-05-10[ruby/psych] Use pend instead of skipHiroshi SHIBATA
https://github.com/ruby/psych/commit/efd2a62c9a
2021-05-10[ruby/psych] Fixed test-case for NaNHiroshi SHIBATA
https://github.com/ruby/psych/commit/f85a008263
2021-05-10[ruby/psych] Use Ractor constant for ignoreing conditionHiroshi SHIBATA
https://github.com/ruby/psych/commit/cc5f957327
2021-05-10[ruby/psych] Use test-unit instead of minitestHiroshi SHIBATA
https://github.com/ruby/psych/commit/01e7310dd3
2020-12-23[ruby/psych] Skip test_ractor.rb with ruby/psych repoHiroshi SHIBATA
Because ruby/psych still uses minitest. minitest didn't support assert_ractor provided by test suite of ruby/ruby repo. https://github.com/ruby/psych/commit/7da26358f1