diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-08-14 00:32:30 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-08-17 14:02:27 +1000 |
commit | 6676b6b104e3f60dd14be18cbfb91b4cd96ec06e (patch) | |
tree | f8db0a5169e47ebd5b1261e73f0491c2f10b837c /spec | |
parent | d02f95cb608e1ee5d90ac06405e354cbc0000706 (diff) | |
download | puppet-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-x | spec/unit/parser/lexer.rb | 9 |
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 = ""' |