summaryrefslogtreecommitdiffstats
path: root/test/language/parser.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-30 18:39:21 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-30 18:39:21 +0000
commit788a74e80c6af40ca2a0d162c5445a0aa0ba866a (patch)
tree838c639dbc1af81c7ca90cf78d558d64f6cae2fe /test/language/parser.rb
parenta7bd7863fe67e2441013c8c26bcc112d76650dcd (diff)
downloadpuppet-788a74e80c6af40ca2a0d162c5445a0aa0ba866a.tar.gz
puppet-788a74e80c6af40ca2a0d162c5445a0aa0ba866a.tar.xz
puppet-788a74e80c6af40ca2a0d162c5445a0aa0ba866a.zip
Partially fixing #460, take 2 -- fully-qualified definitions can now be used.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2127 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language/parser.rb')
-rwxr-xr-xtest/language/parser.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/language/parser.rb b/test/language/parser.rb
index 2386a205b..3f117e050 100755
--- a/test/language/parser.rb
+++ b/test/language/parser.rb
@@ -626,6 +626,22 @@ file { "/tmp/yayness":
assert(code.length == 1, "Did not get the file")
assert_instance_of(Puppet::TransObject, code[0])
end
+
+ def test_fully_qualified_definitions
+ parser = mkparser
+ interp = parser.interp
+
+ assert_nothing_raised("Could not parse fully-qualified definition") {
+ parser.parse %{define one::two { }}
+ }
+ assert(interp.finddefine("", "one::two"), "Could not find one::two with no namespace")
+ assert(interp.finddefine("one", "two"), "Could not find two in namespace one")
+
+ # Now try using the definition
+ assert_nothing_raised("Could not parse fully-qualified definition usage") {
+ parser.parse %{one::two { yayness: }}
+ }
+ end
end
# $Id$