summaryrefslogtreecommitdiffstats
path: root/test/executables/tc_puppetbin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/executables/tc_puppetbin.rb')
-rwxr-xr-xtest/executables/tc_puppetbin.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/executables/tc_puppetbin.rb b/test/executables/tc_puppetbin.rb
new file mode 100755
index 000000000..b42f5aa6a
--- /dev/null
+++ b/test/executables/tc_puppetbin.rb
@@ -0,0 +1,39 @@
+if __FILE__ == $0
+ $:.unshift '../../lib'
+ $:.unshift '../../../../library/trunk/lib/'
+ $:.unshift '../../../../library/trunk/test/'
+ $puppetbase = "../.."
+end
+
+# $ID: $
+
+require 'puppet'
+require 'puppet/server'
+require 'puppet/sslcertificates'
+require 'test/unit'
+require 'puppettest.rb'
+
+# add the bin directory to our search path
+ENV["PATH"] += ":" + File.join($puppetbase, "bin")
+
+# and then the library directories
+libdirs = $:.find_all { |dir|
+ dir =~ /puppet/ or dir =~ /\.\./
+}
+ENV["RUBYLIB"] = libdirs.join(":")
+
+class TestPuppetBin < Test::Unit::TestCase
+ def setup
+ end
+
+ def teardown
+ end
+
+ def test_version
+ output = nil
+ assert_nothing_raised {
+ output = %x{puppet --version}.chomp
+ }
+ assert(output == Puppet.version)
+ end
+end