diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-21 17:39:43 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-09-21 17:39:43 +0000 |
| commit | 5dc3cb04bebc79517ae5f64d1d3c652b6dfba7ea (patch) | |
| tree | f14e075f078b7054ea69418756b5a28ceaed65ef /test/parser | |
| parent | 0747b4c34ee0aa2ba4430021c1c0e676f71c20ac (diff) | |
| download | puppet-5dc3cb04bebc79517ae5f64d1d3c652b6dfba7ea.tar.gz puppet-5dc3cb04bebc79517ae5f64d1d3c652b6dfba7ea.tar.xz puppet-5dc3cb04bebc79517ae5f64d1d3c652b6dfba7ea.zip | |
Okay, significant change -- classes no longer accept arguments (which makes things simpler but encourages the user of global variables, which is bad), and classes are finally singletons, meaning they will only ever be evaluated for each node a single time. I still need to make nodes work correctly, but that is going to involve modifying the parsing system and a bit more
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@694 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/parser')
| -rw-r--r-- | test/parser/tc_lexer.rb | 8 | ||||
| -rw-r--r-- | test/parser/tc_parser.rb | 20 |
2 files changed, 8 insertions, 20 deletions
diff --git a/test/parser/tc_lexer.rb b/test/parser/tc_lexer.rb index 4a8ccedd4..4473ce492 100644 --- a/test/parser/tc_lexer.rb +++ b/test/parser/tc_lexer.rb @@ -9,8 +9,6 @@ require 'puppet/parser/lexer' require 'test/unit' require 'puppettest.rb' -# $Id$ - #%q{service("telnet") = \{ # port => "23", # protocol => "tcp", @@ -18,9 +16,9 @@ require 'puppettest.rb' #\} #} => [[:NAME, "service"], [:LPAREN, "("], [:DQUOTE, "\""], [:NAME, "telnet"], [:DQUOTE, "\""], [:RPAREN, ")"], [:EQUALS, "="], [:lbrace, "{"], [:NAME, "port"], [:FARROW, "=>"], [:DQUOTE, "\""], [:NAME, "23"], [:DQUOTE, "\""], [:COMMA, ","], [:NAME, "protocol"], [:FARROW, "=>"], [:DQUOTE, "\""], [:NAME, "tcp"], [:DQUOTE, "\""], [:COMMA, ","], [:NAME, "name"], [:FARROW, "=>"], [:DQUOTE, "\""], [:NAME, "telnet"], [:DQUOTE, "\""], [:COMMA, ","], [:RBRACE, "}"]] -class TestLexer < Test::Unit::TestCase +class TestLexer < TestPuppet def setup - Puppet[:loglevel] = :debug if __FILE__ == $0 + super @lexer = Puppet::Parser::Lexer.new() end @@ -117,3 +115,5 @@ class TestLexer < Test::Unit::TestCase } end end + +# $Id$ diff --git a/test/parser/tc_parser.rb b/test/parser/tc_parser.rb index 75dd6db82..de2d75ddc 100644 --- a/test/parser/tc_parser.rb +++ b/test/parser/tc_parser.rb @@ -9,26 +9,12 @@ require 'puppet/parser/parser' require 'test/unit' require 'puppettest' -# $Id$ - -class TestParser < Test::Unit::TestCase - # hmmm - # this is complicated, because we store references to the created - # objects in a central store +class TestParser < TestPuppet def setup - Puppet[:loglevel] = :debug if __FILE__ == $0 + super Puppet[:parseonly] = true #@lexer = Puppet::Parser::Lexer.new() @parser = Puppet::Parser::Parser.new() - @@tmpfiles = [] - end - - def teardown - @@tmpfiles.each { |file| - if FileTest.exist?(file) - system("rm -rf %s" % file) - end - } end def test_each_file @@ -73,3 +59,5 @@ class TestParser < Test::Unit::TestCase } end end + +# $Id$ |
