diff options
Diffstat (limited to 'spec/unit/parser')
| -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 |
