summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-08-14 00:32:30 +1000
committerJames Turnbull <james@lovedthanlost.net>2008-08-17 14:02:27 +1000
commit6676b6b104e3f60dd14be18cbfb91b4cd96ec06e (patch)
treef8db0a5169e47ebd5b1261e73f0491c2f10b837c /spec
parentd02f95cb608e1ee5d90ac06405e354cbc0000706 (diff)
downloadpuppet-6676b6b104e3f60dd14be18cbfb91b4cd96ec06e.tar.gz
puppet-6676b6b104e3f60dd14be18cbfb91b4cd96ec06e.tar.xz
puppet-6676b6b104e3f60dd14be18cbfb91b4cd96ec06e.zip
Fixes #1274 - allow class names to start with numbers
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/parser/lexer.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/parser/lexer.rb b/spec/unit/parser/lexer.rb
index 9972f7268..fb666054d 100755
--- a/spec/unit/parser/lexer.rb
+++ b/spec/unit/parser/lexer.rb
@@ -378,6 +378,15 @@ describe "Puppet::Parser::Lexer in the old tests" do
}
end
+ it "should correctly parse names with numerals" do
+ string = %w{1name name1 11names names11}
+
+ string.each { |t|
+ @lexer.string = t
+ @lexer.fullscan.should == [[:NAME,t],[false,false]]
+ }
+ end
+
it "should correctly parse empty strings" do
bit = '$var = ""'