summaryrefslogtreecommitdiffstats
path: root/test/language
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-10-31 16:01:28 -0500
committerLuke Kanies <luke@madstop.com>2008-10-31 16:01:28 -0500
commite76cac7df102389b7ee487be4031caf0e7e2ab04 (patch)
tree0b9bd8d260613a5b41d9c72fa984065e5cb2d5f4 /test/language
parent801b8a643d353176675023adaa25f26d0ec67403 (diff)
parentf0635179b60f5cf30d1f7070f4c3c998ad5131c0 (diff)
Merge branch '0.24.x'
Conflicts: CHANGELOG
Diffstat (limited to 'test/language')
-rwxr-xr-xtest/language/snippets.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb
index 069f7aced..2a997c877 100755
--- a/test/language/snippets.rb
+++ b/test/language/snippets.rb
@@ -30,6 +30,13 @@ class TestSnippets < Test::Unit::TestCase
end
end
+ def assert_not_file(path, msg = nil)
+ if file = @file[path]
+ msg ||= "File %s exists!" % path
+ raise msg
+ end
+ end
+
def assert_mode_equal(mode, path)
unless file = @catalog.resource(:file, path)
raise "Could not find file %s" % path
@@ -459,6 +466,15 @@ class TestSnippets < Test::Unit::TestCase
"Did not make second file from array")
end
+ def snippet_multipleclass
+ assert_file("/tmp/multipleclassone", "one")
+ assert_file("/tmp/multipleclasstwo", "two")
+ end
+
+ def snippet_multilinecomments
+ assert_not_file("/tmp/multilinecomments","Did create a commented resource");
+ end
+
# Iterate across each of the snippets and create a test.
Dir.entries(snippetdir).sort.each { |file|
next if file =~ /^\./