diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2011-03-25 16:25:09 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2011-03-25 16:25:09 -0700 |
| commit | 6985cc0f898d71dbd2ffbb353a2a482d9783cb42 (patch) | |
| tree | 04aa795343486b7bb384836d2550dc9a6312ebe2 /spec/unit/parser/lexer_spec.rb | |
| parent | cc53969290512b15819fbd72021f342fee2f28f5 (diff) | |
| parent | daaa048a8d8829ad509b4a456826cc8a33cf6444 (diff) | |
| download | puppet-6985cc0f898d71dbd2ffbb353a2a482d9783cb42.tar.gz puppet-6985cc0f898d71dbd2ffbb353a2a482d9783cb42.tar.xz puppet-6985cc0f898d71dbd2ffbb353a2a482d9783cb42.zip | |
Merge branch 'ticket/next/5477' into next
Diffstat (limited to 'spec/unit/parser/lexer_spec.rb')
| -rwxr-xr-x | spec/unit/parser/lexer_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb index 96df61348..bc9e22e48 100755 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.rb @@ -676,3 +676,15 @@ describe "Puppet::Parser::Lexer in the old tests when lexing example files" do end end end + +describe "when trying to lex an non-existent file" do + include PuppetSpec::Files + + it "should return an empty list of tokens" do + lexer = Puppet::Parser::Lexer.new + lexer.file = nofile = tmpfile('lexer') + File.exists?(nofile).should == false + + lexer.fullscan.should == [[false,false]] + end +end |
