aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichal Rokos <m.rokos@sh.cvut.cz>2002-06-12 18:12:43 +0000
committerMichal Rokos <m.rokos@sh.cvut.cz>2002-06-12 18:12:43 +0000
commit2b0d53f3ec496f4d58271a20ce00f20c46be913f (patch)
treeaa84b7716692c64fa775e47bbd67911a4be86204 /test
parent01161239ae75f7b87385fcb062199b18badd82ca (diff)
downloadruby-openssl-history-2b0d53f3ec496f4d58271a20ce00f20c46be913f.tar.gz
Added TestCase for Config
Diffstat (limited to 'test')
-rwxr-xr-xtest/tc_config.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/tc_config.rb b/test/tc_config.rb
new file mode 100755
index 0000000..0cb39d8
--- /dev/null
+++ b/test/tc_config.rb
@@ -0,0 +1,38 @@
+#!/usr/bin/env ruby
+=begin
+= $RCSfile$ -- TestCases for OpenSSL::Config
+
+= Info
+ 'OpenSSL for Ruby 2' project
+ Copyright (C) 2002 Michal Rokos <m.rokos@sh.cvut.cz>
+ All rights reserved.
+
+= Licence
+ This program is licenced under the same licence as Ruby.
+ (See the file 'LICENCE'.)
+
+= Version
+ $Id$
+=end
+
+require 'test/unit'
+require 'openssl'
+
+include OpenSSL
+
+OpenSSL::debug = true
+
+class TC_Config < Test::Unit::TestCase
+ def set_up
+ @c = Config::load()
+ end
+ def test_config
+ assert_instance_of(Hash, @c.section("CA_default"), "section")
+ assert_instance_of(String, @c.value(nil, "HOME"), "value")
+ assert_instance_of(String, @c.value("CA_default", "default_days"), "value")
+ end
+ def tear_down
+ @c = nil
+ end
+end
+