summaryrefslogtreecommitdiffstats
path: root/test/executables
diff options
context:
space:
mode:
Diffstat (limited to 'test/executables')
-rwxr-xr-xtest/executables/puppetbin.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/executables/puppetbin.rb b/test/executables/puppetbin.rb
index 218787c92..08329efb6 100755
--- a/test/executables/puppetbin.rb
+++ b/test/executables/puppetbin.rb
@@ -83,5 +83,22 @@ class TestPuppetBin < Test::Unit::TestCase
assert(FileTest.exists?(path), "Failed to create config'ed file")
end
+
+ def test_parseonly
+ path = tempfile()
+ manifest = tempfile()
+ puppet = %x{which puppet}.chomp
+ if puppet == ""
+ Puppet.info "cannot find puppet; cannot test parseonly"
+ return
+ end
+ code = 'File <<| |>>
+ include nosuchclass'
+
+ assert_nothing_raised {
+ IO.popen("#{puppet} --parseonly", 'w') { |p| p.puts code }
+ }
+ assert($? == 0, "parseonly test exited with code %s" % $?.to_i)
+ end
end