summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/other/config.rb20
1 files changed, 18 insertions, 2 deletions
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