summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/lexer_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/lexer_spec.rb')
-rwxr-xr-xspec/unit/parser/lexer_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb
index b8254f2e0..96df61348 100755
--- a/spec/unit/parser/lexer_spec.rb
+++ b/spec/unit/parser/lexer_spec.rb
@@ -529,6 +529,22 @@ describe Puppet::Parser::Lexer, "when lexing comments" do
@lexer.fullscan
end
+ it "should add a new comment stack level on LPAREN" do
+ @lexer.string = "("
+
+ @lexer.expects(:commentpush)
+
+ @lexer.fullscan
+ end
+
+ it "should pop the current comment on RPAREN" do
+ @lexer.string = ")"
+
+ @lexer.expects(:commentpop)
+
+ @lexer.fullscan
+ end
+
it "should return the current comments on getcomment" do
@lexer.string = "# comment"
@lexer.fullscan