aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rwxr-xr-xtest/tc_config.rb38
2 files changed, 41 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a502deb..9032b8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@ ChangeLog for
### CHANGE LOG ###
+Wed, 12 Jun 2002 20:12:13 +0200 -- Michal Rokos <m.rokos@sh.cvut.cz>
+ * tc_config.rb: NEW (TestCase for Config)
+
Wed, 12 Jun 2002 19:52:20 +0200 -- Michal Rokos <m.rokos@sh.cvut.cz>
* config.c: ported to OpenSSL 0.9.7 interface
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
+