diff options
author | OrenGitHub <[email protected]> | 2025-04-29 06:14:37 +0300 |
---|---|---|
committer | git <[email protected]> | 2025-05-09 17:53:17 +0000 |
commit | ae299cc9cd7e19626c973f166098a4128c2779ed (patch) | |
tree | 4f899f2a59cc9d07dbf7d84e80ff6bbebd9f5edb /test | |
parent | f0e2a41d4bacd4ad37843b662194f128737407cf (diff) |
[ruby/psych] add first test for safe load stream
https://github.com/ruby/psych/commit/336553b412
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_stream.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/psych/test_stream.rb b/test/psych/test_stream.rb index 9b71c6d996..ae940d1ee4 100644 --- a/test/psych/test_stream.rb +++ b/test/psych/test_stream.rb @@ -54,6 +54,14 @@ module Psych assert_equal %w{ foo bar }, list end + def test_safe_load_stream_yields_documents + list = [] + Psych.safe_load_stream("--- foo\n...\n--- bar") do |ruby| + list << ruby + end + assert_equal %w{ foo bar }, list + end + def test_load_stream_break list = [] Psych.load_stream("--- foo\n...\n--- `") do |ruby| |