diff options
author | Peter McLain <peter.mclain@gemstone.com> | 2010-03-29 15:52:31 -0700 |
---|---|---|
committer | Peter McLain <peter.mclain@gemstone.com> | 2010-03-29 15:52:31 -0700 |
commit | c5f84428d51d85cee7fffef90b21da162c5d2258 (patch) | |
tree | e8f3b308d6b2666780c1d1c73e5ea62666a73ab9 /test | |
parent | e67d46d87b5911d8e1a5cebbd9cbf37cca7b0a0f (diff) | |
download | psych-c5f84428d51d85cee7fffef90b21da162c5d2258.zip |
Fix problem with empty and white-space only strings. Add test.
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_psych.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index fce070f..88fe83c 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -66,4 +66,11 @@ class TestPsych < Psych::TestCase assert_equal 'hello world', Psych.parse_file(name).transform end + + def test_degenerate_strings + assert_equal false, Psych.load(' ') + assert_equal false, Psych.parse(' ') + assert_equal false, Psych.load('') + assert_equal false, Psych.parse('') + end end |