From a5dec230451cfbfa5df77c2d9f7e8dc5d8c568e4 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Thu, 8 Jul 2010 16:10:10 +0000 Subject: * ext/psych/lib/psych/visitors/emitter.rb (initialize): line_width is a valid option passed to the emitter. * test/psych/test_psych.rb: corresponding tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_psych.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/psych/test_psych.rb') diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 42b30a0c97..81fcccccd4 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -8,6 +8,11 @@ class TestPsych < Psych::TestCase Psych.domain_types.clear end + def test_line_width + yml = Psych.dump('123456 7', { :line_width => 5 }) + assert_match(/^\s*7/, yml) + end + def test_indent yml = Psych.dump({:a => {'b' => 'c'}}, {:indentation => 5}) assert_match(/^[ ]{5}b/, yml) -- cgit v1.2.3