summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/lexer_spec.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-03-25 16:25:09 -0700
committerJesse Wolfe <jes5199@gmail.com>2011-03-25 16:25:09 -0700
commit6985cc0f898d71dbd2ffbb353a2a482d9783cb42 (patch)
tree04aa795343486b7bb384836d2550dc9a6312ebe2 /spec/unit/parser/lexer_spec.rb
parentcc53969290512b15819fbd72021f342fee2f28f5 (diff)
parentdaaa048a8d8829ad509b4a456826cc8a33cf6444 (diff)
downloadpuppet-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-xspec/unit/parser/lexer_spec.rb12
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