diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 16:07:42 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-30 16:07:42 -0700 |
commit | aeda4bb2ae215a67f862edb36f52f50358258278 (patch) | |
tree | 04c13400b240d636213ee4d49ef25538f3d3536a /test/visitors/test_yast_builder.rb | |
parent | 9306ea64be1a720a3f237e885137e1689ef054d0 (diff) | |
download | psych-aeda4bb2ae215a67f862edb36f52f50358258278.zip |
moving boolean classes
Diffstat (limited to 'test/visitors/test_yast_builder.rb')
-rw-r--r-- | test/visitors/test_yast_builder.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb index 9a074e1..9d2945b 100644 --- a/test/visitors/test_yast_builder.rb +++ b/test/visitors/test_yast_builder.rb @@ -14,12 +14,25 @@ module Psych assert_equal a.inspect, Psych.load(a.to_yaml).inspect end + def test_circular_map + a = {} + a[a] = a + assert_equal a.inspect, Psych.load(a.to_yaml).inspect + end + def test_scalar assert_round_trip 'foo' assert_round_trip ':foo' assert_round_trip '' end + def test_boolean + assert_round_trip true + assert_round_trip 'true' + assert_round_trip false + assert_round_trip 'false' + end + def test_binary string = [0, 123,22, 44, 9, 32, 34, 39].pack('C*') assert_equal string, Psych.load(string.to_yaml) |