From 39d33ca6987b2b98663edfa061cac7f4f69f9fb3 Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 7 Feb 2006 03:15:25 +0000 Subject: Temporary commit; configs now can be converted to manifests git-svn-id: https://reductivelabs.com/svn/puppet/trunk@869 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/other/config.rb | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/other/config.rb b/test/other/config.rb index 639fb38f7..849fa1c97 100755 --- a/test/other/config.rb +++ b/test/other/config.rb @@ -111,11 +111,17 @@ class TestConfig < Test::Unit::TestCase end def test_parse - text = %{one = this is a test - two = another test + text = %{ +one = this is a test +two = another test +user = root +group = root +yay = /a/path [section1] attr = value + user = puppet + group = puppet attr2 = /some/dir attr3 = $attr2/other } @@ -132,6 +138,16 @@ class TestConfig < Test::Unit::TestCase assert_equal("value", c[:attr]) assert_equal("/some/dir", c[:attr2]) assert_equal("/some/dir/other", c[:attr3]) + + elem = nil + assert_nothing_raised { + elem = c.element(:attr3) + } + + assert(elem) + assert_equal("puppet", elem.user) + + puts c.to_manifest end end -- cgit