summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-07-12 19:49:41 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-07-12 19:49:41 +0000
commit6ddbec3c7c7196af0d402e8103e0291d2f70471f (patch)
tree4022384a9b04e9a3896121bb573db560bc883df8 /test
parentf217fbf3319b06359ad64b8926970eeddb776169 (diff)
Fixing the interpreter autoloading so that it correctly loads classes even when being loaded from a namespace
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2686 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/interpreter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/language/interpreter.rb b/test/language/interpreter.rb
index 302c7e336..944afa9fa 100755
--- a/test/language/interpreter.rb
+++ b/test/language/interpreter.rb
@@ -970,6 +970,12 @@ class TestInterpreter < PuppetTest::TestCase
assert_instance_of(AST::HostClass, klass, "Did not autoload class from module init file")
assert_equal(name, klass.classname, "Incorrect class was returned")
+ # Try loading the simple module when we're in something other than the base namespace.
+ interp = mkinterp
+ klass = interp.findclass("something::else", name)
+ assert_instance_of(AST::HostClass, klass, "Did not autoload class from module init file")
+ assert_equal(name, klass.classname, "Incorrect class was returned")
+
# Now try it with a definition as the base file
name = "simpdef"
mk_module(name, :define => true, :init => [name])