summaryrefslogtreecommitdiffstats
path: root/test/language
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-13 02:20:24 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-13 02:20:24 +0000
commit58ca9d1241eac3fb982aa673195d5e49ab0a1889 (patch)
tree8515f03f1c1e466ce9d7cee179bc4f4f89e46470 /test/language
parentf9df5236aa75aa2978c7d9ce826aa6b9bf06a711 (diff)
adding snippet test to verify correct behaviour with missing exec path; also, adding "creates" parameter to exec
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@649 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language')
-rwxr-xr-xtest/language/tc_snippets.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/language/tc_snippets.rb b/test/language/tc_snippets.rb
index a02b9fa4d..6623affd6 100755
--- a/test/language/tc_snippets.rb
+++ b/test/language/tc_snippets.rb
@@ -341,6 +341,14 @@ class TestSnippets < Test::Unit::TestCase
"File %s is not 755" % file)
end
+ def snippet_missingexecpath(trans)
+ file = "/tmp/exectesting1"
+ execfile = "/tmp/execdisttesting"
+ @@tmpfiles << file
+ @@tmpfiles << execfile
+ assert(!FileTest.exists?(execfile), "File %s exists" % execfile)
+ end
+
def disabled_snippet_dirchmod(trans)
dirs = %w{a b}.collect { |letter|
"/tmp/dirchmodtest%s" % letter
@@ -364,7 +372,8 @@ class TestSnippets < Test::Unit::TestCase
Dir.entries($snippetbase).sort.each { |file|
next if file =~ /^\./
- mname = "snippet_" + file
+
+ mname = "snippet_" + file.sub(/\.pp$/, '')
if self.method_defined?(mname)
#eval("alias %s %s" % [testname, mname])
testname = ("test_" + mname).intern