diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-08-02 20:54:59 -0700 |
|---|---|---|
| committer | markus <markus@AVA-351181.(none)> | 2010-08-03 15:19:34 -0700 |
| commit | 37568bdd3f8cc3514eb9d0bf0eae3302686bc13d (patch) | |
| tree | 1f4042a15444adfe01a82ce786b3055904cdb357 /spec | |
| parent | 449315a2c705df2396852462a1d1e14774b9f117 (diff) | |
| download | puppet-37568bdd3f8cc3514eb9d0bf0eae3302686bc13d.tar.gz puppet-37568bdd3f8cc3514eb9d0bf0eae3302686bc13d.tar.xz puppet-37568bdd3f8cc3514eb9d0bf0eae3302686bc13d.zip | |
[#4423] class { shouldn't get stored on the namespace stack
The new syntax for instantiating parameterized classes was confusing the
lexer's notion of namespaces.
This is a simple fix to prevent that syntax from polluting the
namespaces.
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/parser/lexer_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb index a85d1b257..bcf49baeb 100755 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.rb @@ -619,6 +619,12 @@ describe "Puppet::Parser::Lexer in the old tests" do @lexer.namespace.should == "base::sub" end + it "should not put class instantiation on the namespace" do + @lexer.string = "class base { class sub { class { mode" + @lexer.fullscan + @lexer.namespace.should == "base::sub" + end + it "should correctly handle fully qualified names" do @lexer.string = "class base { class sub::more {" @lexer.fullscan |
