summaryrefslogtreecommitdiff
path: root/test/visitors/test_yast_builder.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-29 19:55:07 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-29 19:55:07 -0700
commit96fd76f74b6eaa1620b321c8e55ce3c9675239f0 (patch)
tree3825a540ed73f067d6808c74bcbc17adad7af503 /test/visitors/test_yast_builder.rb
parentc95dbd52c43493ed5a56f2b6098fff4a02bd9e8c (diff)
downloadpsych-96fd76f74b6eaa1620b321c8e55ce3c9675239f0.zip
converting strings to yaml ast
Diffstat (limited to 'test/visitors/test_yast_builder.rb')
-rw-r--r--test/visitors/test_yast_builder.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb
index 0e29f94..02f4c91 100644
--- a/test/visitors/test_yast_builder.rb
+++ b/test/visitors/test_yast_builder.rb
@@ -9,6 +9,12 @@ module Psych
v.accept 'foo'
assert_equal 'foo', Psych.load(v.tree.to_yaml)
+ assert_equal 'foo', Psych.load('foo'.to_yaml)
+ end
+
+ def test_binary
+ string = [0, 123,22, 44, 9, 32, 34, 39].pack('C*')
+ assert_equal string, Psych.load(string.to_yaml)
end
end
end