From e04a14aae88a2ceae577155d5b6786702603c0a2 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Wed, 22 Dec 2004 08:06:12 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v1_8_2_preview4'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_2_preview4@7634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/https.rb | 171 ------------------------ lib/xmlrpc/.document | 1 - runruby.rb | 57 -------- test/ruby/test_readpartial.rb | 72 ---------- test/ruby/test_super.rb | 88 ------------ test/xmlrpc/data/bug_bool.expected | 3 - test/xmlrpc/data/bug_bool.xml | 8 -- test/xmlrpc/data/bug_cdata.expected | 3 - test/xmlrpc/data/bug_cdata.xml | 8 -- test/xmlrpc/data/bug_covert.expected | 10 -- test/xmlrpc/data/bug_covert.xml | 6 - test/xmlrpc/data/datetime_iso8601.xml | 8 -- test/xmlrpc/data/fault.xml | 16 --- test/xmlrpc/data/value.expected | 7 - test/xmlrpc/data/value.xml | 22 --- test/xmlrpc/data/xml1.expected | 243 ---------------------------------- test/xmlrpc/data/xml1.xml | 1 - test/xmlrpc/test_datetime.rb | 159 ---------------------- test/xmlrpc/test_features.rb | 48 ------- test/xmlrpc/test_marshal.rb | 93 ------------- test/xmlrpc/test_parser.rb | 85 ------------ win32/rm.bat | 9 -- 22 files changed, 1118 deletions(-) delete mode 100644 lib/net/https.rb delete mode 100644 lib/xmlrpc/.document delete mode 100755 runruby.rb delete mode 100644 test/ruby/test_readpartial.rb delete mode 100644 test/ruby/test_super.rb delete mode 100644 test/xmlrpc/data/bug_bool.expected delete mode 100644 test/xmlrpc/data/bug_bool.xml delete mode 100644 test/xmlrpc/data/bug_cdata.expected delete mode 100644 test/xmlrpc/data/bug_cdata.xml delete mode 100644 test/xmlrpc/data/bug_covert.expected delete mode 100644 test/xmlrpc/data/bug_covert.xml delete mode 100644 test/xmlrpc/data/datetime_iso8601.xml delete mode 100644 test/xmlrpc/data/fault.xml delete mode 100644 test/xmlrpc/data/value.expected delete mode 100644 test/xmlrpc/data/value.xml delete mode 100644 test/xmlrpc/data/xml1.expected delete mode 100644 test/xmlrpc/data/xml1.xml delete mode 100644 test/xmlrpc/test_datetime.rb delete mode 100644 test/xmlrpc/test_features.rb delete mode 100644 test/xmlrpc/test_marshal.rb delete mode 100644 test/xmlrpc/test_parser.rb delete mode 100755 win32/rm.bat diff --git a/lib/net/https.rb b/lib/net/https.rb deleted file mode 100644 index fb329df43d..0000000000 --- a/lib/net/https.rb +++ /dev/null @@ -1,171 +0,0 @@ -=begin - -= $RCSfile$ -- SSL/TLS enhancement for Net::HTTP. - -== Info - 'OpenSSL for Ruby 2' project - Copyright (C) 2001 GOTOU Yuuzou - All rights reserved. - -== Licence - This program is licenced under the same licence as Ruby. - (See the file 'LICENCE'.) - -== Requirements - This program requires Net 1.2.0 or higher version. - You can get it from RAA or Ruby's CVS repository. - -== Version - $Id$ - - 2001-11-06: Contiributed to Ruby/OpenSSL project. - 2004-03-06: Some code is merged in to net/http. - -== Example - -Here is a simple HTTP client: - - require 'net/http' - require 'uri' - - uri = URI.parse(ARGV[0] || 'http://localhost/') - http = Net::HTTP.new(uri.host, uri.port) - http.start { - http.request_get(uri.path) {|res| - print res.body - } - } - -It can be replaced by the following code: - - require 'net/https' - require 'uri' - - uri = URI.parse(ARGV[0] || 'https://localhost/') - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = true if uri.scheme == "https" # enable SSL/TLS - http.start { - http.request_get(uri.path) {|res| - print res.body - } - } - -== class Net::HTTP - -=== Instance Methods - -: use_ssl? - returns true if use SSL/TLS with HTTP. - -: use_ssl=((|true_or_false|)) - sets use_ssl. - -: peer_cert - return the X.509 certificates the server presented. - -: key, key=((|key|)) - Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. - (This method is appeared in Michal Rokos's OpenSSL extention.) - -: cert, cert=((|cert|)) - Sets an OpenSSL::X509::Certificate object as client certificate - (This method is appeared in Michal Rokos's OpenSSL extention). - -: ca_file, ca_file=((|path|)) - Sets path of a CA certification file in PEM format. - The file can contrain several CA certificats. - -: ca_path, ca_path=((|path|)) - Sets path of a CA certification directory containing certifications - in PEM format. - -: verify_mode, verify_mode=((|mode|)) - Sets the flags for server the certification verification at - begining of SSL/TLS session. - OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER is acceptable. - -: verify_callback, verify_callback=((|proc|)) - Sets the verify callback for the server certification verification. - -: verify_depth, verify_depth=((|num|)) - Sets the maximum depth for the certificate chain verification. - -: cert_store, cert_store=((|store|)) - Sets the X509::Store to verify peer certificate. - -: ssl_timeout, ssl_timeout=((|sec|)) - Sets the SSL timeout seconds. - -=end - -require 'net/http' -require 'openssl' - -module Net - - class HTTP - remove_method :use_ssl? - def use_ssl? - @use_ssl - end - - alias use_ssl use_ssl? # for backward compatibility - - # Turn on/off SSL. - # This flag must be set before starting session. - # If you change use_ssl value after session started, - # a Net::HTTP object raises IOError. - def use_ssl=(flag) - flag = (flag ? true : false) - raise IOError, "use_ssl value changed, but session already started" \ - if started? and @use_ssl != flag - if flag and not @ssl_context - @ssl_context = OpenSSL::SSL::SSLContext.new - end - @use_ssl = flag - end - - def self.ssl_context_accessor(name) - module_eval(<<-End, __FILE__, __LINE__ + 1) - def #{name} - return nil unless @ssl_context - @ssl_context.#{name} - end - - def #{name}=(val) - @ssl_context ||= OpenSSL::SSL::SSLContext.new - @ssl_context.#{name} = val - end - End - end - - ssl_context_accessor :key - ssl_context_accessor :cert - ssl_context_accessor :ca_file - ssl_context_accessor :ca_path - ssl_context_accessor :verify_mode - ssl_context_accessor :verify_callback - ssl_context_accessor :verify_depth - ssl_context_accessor :cert_store - - def ssl_timeout - return nil unless @ssl_context - @ssl_context.timeout - end - - def ssl_timeout=(sec) - raise ArgumentError, 'Net::HTTP#ssl_timeout= called but use_ssl=false' \ - unless use_ssl? - @ssl_context ||= OpenSSL::SSL::SSLContext.new - @ssl_context.timeout = sec - end - - alias timeout= ssl_timeout= # for backward compatibility - - def peer_cert - return nil if not use_ssl? or not @socket - @socket.io.peer_cert - end - end - -end diff --git a/lib/xmlrpc/.document b/lib/xmlrpc/.document deleted file mode 100644 index e475c53ed0..0000000000 --- a/lib/xmlrpc/.document +++ /dev/null @@ -1 +0,0 @@ -README.rdoc diff --git a/runruby.rb b/runruby.rb deleted file mode 100755 index a175dcb9aa..0000000000 --- a/runruby.rb +++ /dev/null @@ -1,57 +0,0 @@ -#!./miniruby - -while arg = ARGV[0] - break ARGV.shift if arg == '--' - /\A--([-\w]+)(?:=(.*))?\z/ =~ arg or break - arg, value = $1, $2 - re = Regexp.new('\A'+arg.gsub(/\w+\b/, '\&\\w*')+'\z', "i") - case - when re =~ "srcdir" - srcdir = value - when re =~ "archdir" - archdir = value - when re =~ "extout" - extout = value - else - break - end - ARGV.shift -end - -require 'rbconfig' -config = Config::CONFIG - -srcdir ||= File.dirname(__FILE__) -archdir ||= '.' - -ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT']) -unless File.exist?(ruby) - abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n" -end - -abs_archdir = File.expand_path(archdir) -libs = [abs_archdir, File.expand_path("lib", srcdir)] -if extout - abs_extout = File.expand_path(extout) - libs << abs_extout << File.expand_path(RUBY_PLATFORM, abs_extout) -end -config["bindir"] = abs_archdir -ENV["RUBY"] = File.expand_path(ruby) -ENV["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR) - -if e = ENV["RUBYLIB"] - libs |= e.split(File::PATH_SEPARATOR) -end -ENV["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR) - -libruby_so = File.join(abs_archdir, config['LIBRUBY_SO']) -if File.file?(libruby_so) - if e = config['LIBPATHENV'] and !e.empty? - ENV[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR) - end - if /linux/ =~ RUBY_PLATFORM - ENV["LD_PRELOAD"] = [libruby_so, ENV["LD_PRELOAD"]].compact.join(' ') - end -end - -exec ruby, *ARGV diff --git a/test/ruby/test_readpartial.rb b/test/ruby/test_readpartial.rb deleted file mode 100644 index 526425dc57..0000000000 --- a/test/ruby/test_readpartial.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'test/unit' -require 'timeout' -require 'fcntl' - -class TestReadPartial < Test::Unit::TestCase - def make_pipe - r, w = IO.pipe - begin - yield r, w - ensure - r.close unless r.closed? - w.close unless w.closed? - end - end - - def pipe - make_pipe {|r, w| - yield r, w - } - return unless defined?(Fcntl::F_SETFL) - return unless defined?(Fcntl::F_GETFL) - return unless defined?(Fcntl::O_NONBLOCK) - make_pipe {|r, w| - r.fcntl(Fcntl::F_SETFL, r.fcntl(Fcntl::F_GETFL) | Fcntl::O_NONBLOCK) - yield r, w - } - end - - def test_length_zero - pipe {|r, w| - assert_equal('', r.readpartial(0)) - } - end - - def test_closed_pipe - pipe {|r, w| - w << 'abc' - w.close - assert_equal('ab', r.readpartial(2)) - assert_equal('c', r.readpartial(2)) - assert_raises(EOFError) { r.readpartial(2) } - assert_raises(EOFError) { r.readpartial(2) } - } - end - - def test_open_pipe - pipe {|r, w| - w << 'abc' - assert_equal('ab', r.readpartial(2)) - assert_equal('c', r.readpartial(2)) - assert_raises(TimeoutError) { - timeout(0.1) { r.readpartial(2) } - } - } - end - - def test_with_stdio - pipe {|r, w| - w << "abc\ndef\n" - assert_equal("abc\n", r.gets) - w << "ghi\n" - assert_equal("de", r.readpartial(2)) - assert_equal("f\n", r.readpartial(4096)) - assert_equal("ghi\n", r.readpartial(4096)) - assert_raises(TimeoutError) { - timeout(0.1) { r.readpartial(2) } - } - } - end - -end - diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb deleted file mode 100644 index df229a8f1a..0000000000 --- a/test/ruby/test_super.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'test/unit' - -class TestSuper < Test::Unit::TestCase - class Base - def single(a) a end - def double(a, b) [a,b] end - def array(*a) a end - end - class Single1 < Base - def single(*) super end - end - class Single2 < Base - def single(a,*) super end - end - class Double1 < Base - def double(*) super end - end - class Double2 < Base - def double(a,*) super end - end - class Double3 < Base - def double(a,b,*) super end - end - class Array1 < Base - def array(*) super end - end - class Array2 < Base - def array(a,*) super end - end - class Array3 < Base - def array(a,b,*) super end - end - class Array4 < Base - def array(a,b,c,*) super end - end - - def test_single1 - assert_equal(1, Single1.new.single(1)) - end - def test_single2 - assert_equal(1, Single2.new.single(1)) - end - def test_double1 - assert_equal([1, 2], Double1.new.double(1, 2)) - end - def test_double2 - assert_equal([1, 2], Double2.new.double(1, 2)) - end - def test_double3 - assert_equal([1, 2], Double3.new.double(1, 2)) - end - def test_array1 - assert_equal([], Array1.new.array()) - assert_equal([1], Array1.new.array(1)) - end - def test_array2 - assert_equal([1], Array2.new.array(1)) - assert_equal([1,2], Array2.new.array(1, 2)) - end - def test_array3 - assert_equal([1,2], Array3.new.array(1, 2)) - assert_equal([1,2,3], Array3.new.array(1, 2, 3)) - end - def test_array4 - assert_equal([1,2,3], Array4.new.array(1, 2, 3)) - assert_equal([1,2,3,4], Array4.new.array(1, 2, 3, 4)) - end - - class A - def tt(aa) - "A#tt" - end - - def uu(a) - class << self - define_method(:tt) do |sym| - super - end - end - end - end - - def test_define_method # [ruby-core:03856] - a = A.new - a.uu(12) - assert_equal("A#tt", a.tt(12)) - end -end diff --git a/test/xmlrpc/data/bug_bool.expected b/test/xmlrpc/data/bug_bool.expected deleted file mode 100644 index 121e3a84ba..0000000000 --- a/test/xmlrpc/data/bug_bool.expected +++ /dev/null @@ -1,3 +0,0 @@ ---- -- true -- false \ No newline at end of file diff --git a/test/xmlrpc/data/bug_bool.xml b/test/xmlrpc/data/bug_bool.xml deleted file mode 100644 index 04ed00709e..0000000000 --- a/test/xmlrpc/data/bug_bool.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 0 - - - diff --git a/test/xmlrpc/data/bug_cdata.expected b/test/xmlrpc/data/bug_cdata.expected deleted file mode 100644 index 17d7861318..0000000000 --- a/test/xmlrpc/data/bug_cdata.expected +++ /dev/null @@ -1,3 +0,0 @@ ---- -- true -- test \ No newline at end of file diff --git a/test/xmlrpc/data/bug_cdata.xml b/test/xmlrpc/data/bug_cdata.xml deleted file mode 100644 index ba990e04f1..0000000000 --- a/test/xmlrpc/data/bug_cdata.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/test/xmlrpc/data/bug_covert.expected b/test/xmlrpc/data/bug_covert.expected deleted file mode 100644 index a9ac103c64..0000000000 --- a/test/xmlrpc/data/bug_covert.expected +++ /dev/null @@ -1,10 +0,0 @@ ---- -- true -- > - Site,SANs,Array - - Configured Capacity,Array Reserved Capacity,Array Ava - - ilable Capacity,Array % Reserved,Host Allocated,Host Used,Host Free,Host % - - Used diff --git a/test/xmlrpc/data/bug_covert.xml b/test/xmlrpc/data/bug_covert.xml deleted file mode 100644 index 1d9abd2a06..0000000000 --- a/test/xmlrpc/data/bug_covert.xml +++ /dev/null @@ -1,6 +0,0 @@ -Site,SANs,Array -Configured Capacity,Array Reserved Capacity,Array Ava -ilable Capacity,Array % Reserved,Host Allocated,Host Used,Host Free,Host % -Used - diff --git a/test/xmlrpc/data/datetime_iso8601.xml b/test/xmlrpc/data/datetime_iso8601.xml deleted file mode 100644 index 43d8da6c13..0000000000 --- a/test/xmlrpc/data/datetime_iso8601.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 20041105T01:15:23Z - - - diff --git a/test/xmlrpc/data/fault.xml b/test/xmlrpc/data/fault.xml deleted file mode 100644 index 041c464eb3..0000000000 --- a/test/xmlrpc/data/fault.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - faultCode - 4 - - - faultString - an error message - - - - - diff --git a/test/xmlrpc/data/value.expected b/test/xmlrpc/data/value.expected deleted file mode 100644 index 9463d02b13..0000000000 --- a/test/xmlrpc/data/value.expected +++ /dev/null @@ -1,7 +0,0 @@ ---- -- Test -- - - Hallo Leute - - " Hallo " - - '' - - " " \ No newline at end of file diff --git a/test/xmlrpc/data/value.xml b/test/xmlrpc/data/value.xml deleted file mode 100644 index 1978616099..0000000000 --- a/test/xmlrpc/data/value.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - Test - - - Hallo Leute - - - Hallo - - - - - - - - - - - - - diff --git a/test/xmlrpc/data/xml1.expected b/test/xmlrpc/data/xml1.expected deleted file mode 100644 index ff96de8df3..0000000000 --- a/test/xmlrpc/data/xml1.expected +++ /dev/null @@ -1,243 +0,0 @@ ---- -- true -- - - - subscriber: MegaCorp - lastName: Baker - telephone1: 1-508-791-1267 - telephone2: 1-800-445-2588 - password: p1111 - OID: "1" - email: hbaker@yahoo.com - adminId: hbaker - objectName: AdministratorDO - - - subscriber: CornerStore - lastName: Dragon - telephone1: 1-781-789-9089 - telephone2: 1-800-445-2588 - password: p3333 - OID: "3" - email: adragon@yahoo.com - adminId: adragon - objectName: AdministratorDO - - - subscriber: Cyberdyne - lastName: Rodman - telephone1: 1-617-789-1890 - telephone2: 1-800-445-2588 - password: p4444 - OID: "4" - email: mrodman@yahoo.com - adminId: mrodman - objectName: AdministratorDO - - - subscriber: StarSports - lastName: Jordan - telephone1: 1-617-890-7897 - telephone2: 1-800-445-2588 - password: p5555 - OID: "5" - email: mjordan@yahoo.com - adminId: mjordan - objectName: AdministratorDO - - - subscriber: GreatBooks - lastName: Pippen - telephone1: 1-781-789-9876 - telephone2: 1-800-445-2588 - password: p6666 - OID: "6" - email: gpippen@yahoo.com - adminId: gpippen - objectName: AdministratorDO - - - subscriber: AxisChemicals - lastName: Andhrew - telephone1: 1-781-678-8970 - telephone2: 1-800-445-2588 - password: p7777 - OID: "7" - email: aandrew@yahoo.com - adminId: aandrew - objectName: AdministratorDO - - - subscriber: MediaShop - lastName: Vincent - telephone1: 1-786-897-8908 - telephone2: 1-800-445-2588 - password: p8888 - OID: "8" - email: tvincent@yahoo.com - adminId: tvincent - objectName: AdministratorDO - - - subscriber: SmartShop - lastName: Richard - telephone1: 1-508-789-6789 - telephone2: 1-800-445-2588 - password: p9999 - OID: "9" - email: krichard@yahoo.com - adminId: krichard - objectName: AdministratorDO - - - subscriber: HomeNeeds - lastName: Cornell - telephone1: 1-617-789-8979 - telephone2: 1-800-445-2588 - password: paaaa - OID: "10" - email: gconell@yahoo.com - adminId: gcornell - objectName: AdministratorDO - - - subscriber: MegaCorp - lastName: HorstMann - telephone1: 1-508-791-1267 - telephone2: 1-800-445-2588 - password: p1111 - OID: "11" - email: shorstmann@yahoo.com - adminId: shorstmann - objectName: AdministratorDO - - - subscriber: CornerStore - lastName: Bob - telephone1: 1-781-789-9089 - telephone2: 1-800-445-2588 - password: p3333 - OID: "13" - email: rbob@yahoo.com - adminId: rbob - objectName: AdministratorDO - - - subscriber: Cyberdyne - lastName: Peter - telephone1: 1-617-789-1890 - telephone2: 1-800-445-2588 - password: p4444 - OID: "14" - email: speter@yahoo.com - adminId: speter - objectName: AdministratorDO - - - subscriber: StarSports - lastName: Novak - telephone1: 1-617-890-7897 - telephone2: 1-800-445-2588 - password: p5555 - OID: "15" - email: pnovak@yahoo.com - adminId: pnovak - objectName: AdministratorDO - - - subscriber: GreatBooks - lastName: Nancy - telephone1: 1-781-789-9876 - telephone2: 1-800-445-2588 - password: p6666 - OID: "16" - email: pnancy@yahoo.com - adminId: pnancy - objectName: AdministratorDO - - - subscriber: AxisChemicals - lastName: Michel - telephone1: 1-781-678-8970 - telephone2: 1-800-445-2588 - password: p7777 - OID: "17" - email: hmichel@yahoo.com - adminId: hmichel - objectName: AdministratorDO - - - subscriber: MediaShop - lastName: David - telephone1: 1-786-897-8908 - telephone2: 1-800-445-2588 - password: p8888 - OID: "18" - email: kdavid@yahoo.com - adminId: kdavid - objectName: AdministratorDO - - - subscriber: SmartShop - lastName: Valnoor - telephone1: 1-508-789-6789 - telephone2: 1-800-445-2588 - password: p9999 - OID: "19" - email: pvalnoor@yahoo.com - adminId: pvalnoor - objectName: AdministratorDO - - - subscriber: HomeNeeds - lastName: Smith - telephone1: 1-617-789-8979 - telephone2: 1-800-445-2588 - password: paaaa - OID: "20" - email: wsmith@yahoo.com - adminId: wsmith - objectName: AdministratorDO - - - subscriber: MegaCorp - lastName: Caral - telephone1: 1-781-789-9876 - telephone2: 1-800-445-2588 - password: p6666 - OID: "21" - email: gcaral@yahoo.com - adminId: gcaral - objectName: AdministratorDO - - - subscriber: CornerStore - lastName: Hillary - telephone1: 1-786-897-8908 - telephone2: 1-800-445-2588 - password: p8888 - OID: "23" - email: phillary@yahoo.com - adminId: phillary - objectName: AdministratorDO - - - subscriber: Cyberdyne - lastName: Philip - telephone1: 1-508-789-6789 - telephone2: 1-800-445-2588 - password: p9999 - OID: "24" - email: bphilip@yahoo.com - adminId: bphilip - objectName: AdministratorDO - - - subscriber: StarSports - lastName: Andrea - telephone1: 1-617-789-8979 - telephone2: 1-800-445-2588 - password: paaaa - OID: "25" - email: sandrea@yahoo.com - adminId: sandrea - objectName: AdministratorDO - - - subscriber: s4 - lastName: "null" - telephone1: "null" - telephone2: "null" - password: s4 - OID: "26" - email: "null" - adminId: s4 - objectName: AdministratorDO - - - subscriber: BigBank - lastName: administrator - telephone1: '' - telephone2: '' - password: admin - OID: "82" - email: '' - adminId: admin - objectName: AdministratorDO \ No newline at end of file diff --git a/test/xmlrpc/data/xml1.xml b/test/xmlrpc/data/xml1.xml deleted file mode 100644 index 10aa55483b..0000000000 --- a/test/xmlrpc/data/xml1.xml +++ /dev/null @@ -1 +0,0 @@ -objectNameAdministratorDOadminIdhbakeremailhbaker@yahoo.comtelephone21-800-445-2588telephone11-508-791-1267OID1passwordp1111lastNameBakersubscriberMegaCorpobjectNameAdministratorDOadminIdadragonemailadragon@yahoo.comtelephone21-800-445-2588telephone11-781-789-9089OID3passwordp3333lastNameDragonsubscriberCornerStoreobjectNameAdministratorDOadminIdmrodmanemailmrodman@yahoo.comtelephone21-800-445-2588telephone11-617-789-1890OID4passwordp4444lastNameRodmansubscriberCyberdyneobjectNameAdministratorDOadminIdmjordanemailmjordan@yahoo.comtelephone21-800-445-2588telephone11-617-890-7897OID5passwordp5555lastNameJordansubscriberStarSportsobjectNameAdministratorDOadminIdgpippenemailgpippen@yahoo.comtelephone21-800-445-2588telephone11-781-789-9876OID6passwordp6666lastNamePippensubscriberGreatBooksobjectNameAdministratorDOadminIdaandrewemailaandrew@yahoo.comtelephone21-800-445-2588telephone11-781-678-8970OID7passwordp7777lastNameAndhrewsubscriberAxisChemicalsobjectNameAdministratorDOadminIdtvincentemailtvincent@yahoo.comtelephone21-800-445-2588telephone11-786-897-8908OID8passwordp8888lastNameVincentsubscriberMediaShopobjectNameAdministratorDOadminIdkrichardemailkrichard@yahoo.comtelephone21-800-445-2588telephone11-508-789-6789OID9passwordp9999lastNameRichardsubscriberSmartShopobjectNameAdministratorDOadminIdgcornellemailgconell@yahoo.comtelephone21-800-445-2588telephone11-617-789-8979OID10passwordpaaaalastNameCornellsubscriberHomeNeedsobjectNameAdministratorDOadminIdshorstmannemailshorstmann@yahoo.comtelephone21-800-445-2588telephone11-508-791-1267OID11passwordp1111lastNameHorstMannsubscriberMegaCorpobjectNameAdministratorDOadminIdrbobemailrbob@yahoo.comtelephone21-800-445-2588telephone11-781-789-9089OID13passwordp3333lastNameBobsubscriberCornerStoreobjectNameAdministratorDOadminIdspeteremailspeter@yahoo.comtelephone21-800-445-2588telephone11-617-789-1890OID14passwordp4444lastNamePetersubscriberCyberdyneobjectNameAdministratorDOadminIdpnovakemailpnovak@yahoo.comtelephone21-800-445-2588telephone11-617-890-7897OID15passwordp5555lastNameNovaksubscriberStarSportsobjectNameAdministratorDOadminIdpnancyemailpnancy@yahoo.comtelephone21-800-445-2588telephone11-781-789-9876OID16passwordp6666lastNameNancysubscriberGreatBooksobjectNameAdministratorDOadminIdhmichelemailhmichel@yahoo.comtelephone21-800-445-2588telephone11-781-678-8970OID17passwordp7777lastNameMichelsubscriberAxisChemicalsobjectNameAdministratorDOadminIdkdavidemailkdavid@yahoo.comtelephone21-800-445-2588telephone11-786-897-8908OID18passwordp8888lastNameDavidsubscriberMediaShopobjectNameAdministratorDOadminIdpvalnooremailpvalnoor@yahoo.comtelephone21-800-445-2588telephone11-508-789-6789OID19passwordp9999lastNameValnoorsubscriberSmartShopobjectNameAdministratorDOadminIdwsmithemailwsmith@yahoo.comtelephone21-800-445-2588telephone11-617-789-8979OID20passwordpaaaalastNameSmithsubscriberHomeNeedsobjectNameAdministratorDOadminIdgcaralemailgcaral@yahoo.comtelephone21-800-445-2588telephone11-781-789-9876OID21passwordp6666lastNameCaralsubscriberMegaCorpobjectNameAdministratorDOadminIdphillaryemailphillary@yahoo.comtelephone21-800-445-2588telephone11-786-897-8908OID23passwordp8888lastNameHillarysubscriberCornerStoreobjectNameAdministratorDOadminIdbphilipemailbphilip@yahoo.comtelephone21-800-445-2588telephone11-508-789-6789OID24passwordp9999lastNamePhilipsubscriberCyberdyneobjectNameAdministratorDOadminIdsandreaemailsandrea@yahoo.comtelephone21-800-445-2588telephone11-617-789-8979OID25passwordpaaaalastNameAndreasubscriberStarSportsobjectNameAdministratorDOadminIds4emailnulltelephone2nulltelephone1nullOID26passwords4lastNamenullsubscribers4objectNameAdministratorDOadminIdadminemailtelephone2telephone1OID82passwordadminlastNameadministratorsubscriberBigBank diff --git a/test/xmlrpc/test_datetime.rb b/test/xmlrpc/test_datetime.rb deleted file mode 100644 index e38cea6f74..0000000000 --- a/test/xmlrpc/test_datetime.rb +++ /dev/null @@ -1,159 +0,0 @@ -require 'test/unit' -require "xmlrpc/datetime" - -class Test_DateTime < Test::Unit::TestCase - - def test_new - dt = createDateTime() - - assert_instance_of(XMLRPC::DateTime, dt) - end - - def test_new_exception - assert_raises(ArgumentError) { XMLRPC::DateTime.new(4.5, 13, 32, 25, 60, 60) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 32, 25, 60, 60) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 25, 60, 60) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 60, 60) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 60) } - assert_nothing_raised(ArgumentError) { XMLRPC::DateTime.new(2001, 12, 31, 24, 59, 59) } - - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 0, 0, -1, -1, -1) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 0, -1, -1, -1) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, -1, -1, -1) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, -1, -1) } - assert_raises(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, -1) } - assert_nothing_raised(ArgumentError) { XMLRPC::DateTime.new(2001, 1, 1, 0, 0, 0) } - end - - - def test_get_values - y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5 - dt = XMLRPC::DateTime.new(y, m, d, h, mi, s) - - assert_equal(y, dt.year) - assert_equal(m, dt.month) - assert_equal(m, dt.mon) - assert_equal(d, dt.day) - - assert_equal(h, dt.hour) - assert_equal(mi,dt.min) - assert_equal(s, dt.sec) - end - - def test_set_values - dt = createDateTime() - y, m, d, h, mi, s = 1950, 12, 9, 8, 52, 30 - - dt.year = y - dt.month = m - dt.day = d - dt.hour = h - dt.min = mi - dt.sec = s - - assert_equal(y, dt.year) - assert_equal(m, dt.month) - assert_equal(m, dt.mon) - assert_equal(d, dt.day) - - assert_equal(h, dt.hour) - assert_equal(mi,dt.min) - assert_equal(s, dt.sec) - - dt.mon = 5 - assert_equal(5, dt.month) - assert_equal(5, dt.mon) - end - - def test_set_exception - dt = createDateTime() - - assert_raises(ArgumentError) { dt.year = 4.5 } - assert_nothing_raised(ArgumentError) { dt.year = -2000 } - - assert_raises(ArgumentError) { dt.month = 0 } - assert_raises(ArgumentError) { dt.month = 13 } - assert_nothing_raised(ArgumentError) { dt.month = 7 } - - assert_raises(ArgumentError) { dt.mon = 0 } - assert_raises(ArgumentError) { dt.mon = 13 } - assert_nothing_raised(ArgumentError) { dt.mon = 7 } - - assert_raises(ArgumentError) { dt.day = 0 } - assert_raises(ArgumentError) { dt.day = 32 } - assert_nothing_raised(ArgumentError) { dt.day = 16 } - - assert_raises(ArgumentError) { dt.hour = -1 } - assert_raises(ArgumentError) { dt.hour = 25 } - assert_nothing_raised(ArgumentError) { dt.hour = 12 } - - assert_raises(ArgumentError) { dt.min = -1 } - assert_raises(ArgumentError) { dt.min = 60 } - assert_nothing_raised(ArgumentError) { dt.min = 30 } - - assert_raises(ArgumentError) { dt.sec = -1 } - assert_raises(ArgumentError) { dt.sec = 60 } - assert_nothing_raised(ArgumentError) { dt.sec = 30 } - end - - def test_to_a - y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5 - dt = XMLRPC::DateTime.new(y, m, d, h, mi, s) - a = dt.to_a - - assert_instance_of(Array, a) - assert_equal(6, a.size, "Returned array has wrong size") - - assert_equal(y, a[0]) - assert_equal(m, a[1]) - assert_equal(d, a[2]) - assert_equal(h, a[3]) - assert_equal(mi, a[4]) - assert_equal(s, a[5]) - end - - def test_to_time1 - y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5 - dt = XMLRPC::DateTime.new(y, m, d, h, mi, s) - time = dt.to_time - - assert_not_nil(time) - - assert_equal(y, time.year) - assert_equal(m, time.month) - assert_equal(d, time.day) - assert_equal(h, time.hour) - assert_equal(mi, time.min) - assert_equal(s, time.sec) - end - - def test_to_time2 - dt = createDateTime() - dt.year = 1969 - - assert_nil(dt.to_time) - end - - def test_to_date1 - y, m, d, h, mi, s = 1970, 3, 24, 12, 0, 5 - dt = XMLRPC::DateTime.new(y, m, d, h, mi, s) - date = dt.to_date - - assert_equal(y, date.year) - assert_equal(m, date.month) - assert_equal(d, date.day) - end - - def test_to_date2 - dt = createDateTime() - dt.year = 666 - - assert_equal(666, dt.to_date.year) - end - - - def createDateTime - XMLRPC::DateTime.new(1970, 3, 24, 12, 0, 5) - end - -end diff --git a/test/xmlrpc/test_features.rb b/test/xmlrpc/test_features.rb deleted file mode 100644 index 96a6313202..0000000000 --- a/test/xmlrpc/test_features.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'test/unit' -require "xmlrpc/create" -require "xmlrpc/parser" -require "xmlrpc/config" - -class Test_Features < Test::Unit::TestCase - - def setup - @params = [nil, {"test" => nil}, [nil, 1, nil]] - end - - def test_nil_create - XMLRPC::XMLWriter.each_installed_writer do |writer| - c = XMLRPC::Create.new(writer) - - XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)} - XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, false) - assert_raises(RuntimeError) { str = c.methodCall("test", *@params) } - - XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)} - XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, true) - assert_nothing_raised { str = c.methodCall("test", *@params) } - end - end - - def test_nil_parse - XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_CREATE)} - XMLRPC::Config.const_set(:ENABLE_NIL_CREATE, true) - - XMLRPC::XMLWriter.each_installed_writer do |writer| - c = XMLRPC::Create.new(writer) - str = c.methodCall("test", *@params) - XMLRPC::XMLParser.each_installed_parser do |parser| - para = nil - - XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_PARSER)} - XMLRPC::Config.const_set(:ENABLE_NIL_PARSER, false) - assert_raises(RuntimeError) { para = parser.parseMethodCall(str) } - - XMLRPC::Config.module_eval {remove_const(:ENABLE_NIL_PARSER)} - XMLRPC::Config.const_set(:ENABLE_NIL_PARSER, true) - assert_nothing_raised { para = parser.parseMethodCall(str) } - assert_equal(para[1], @params) - end - end - end - -end diff --git a/test/xmlrpc/test_marshal.rb b/test/xmlrpc/test_marshal.rb deleted file mode 100644 index 38bc8c646f..0000000000 --- a/test/xmlrpc/test_marshal.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'test/unit' -require "xmlrpc/marshal" - -class Test_Marshal < Test::Unit::TestCase - # for test_parser_values - class Person - include XMLRPC::Marshallable - attr_reader :name - def initialize(name) - @name = name - end - end - - - def test1_dump_response - assert_nothing_raised(NameError) { - XMLRPC::Marshal.dump_response('arg') - } - end - - def test1_dump_call - assert_nothing_raised(NameError) { - XMLRPC::Marshal.dump_call('methodName', 'arg') - } - end - - def test2_dump_load_response - value = [1, 2, 3, {"test" => true}, 3.4] - res = XMLRPC::Marshal.dump_response(value) - - assert_equal(value, XMLRPC::Marshal.load_response(res)) - end - - def test2_dump_load_call - methodName = "testMethod" - value = [1, 2, 3, {"test" => true}, 3.4] - exp = [methodName, [value, value]] - - res = XMLRPC::Marshal.dump_call(methodName, value, value) - - assert_equal(exp, XMLRPC::Marshal.load_call(res)) - end - - def test_parser_values - v1 = [ - 1, -7778, # integers - 1.0, 0.0, -333.0, 2343434343.0, # floats - false, true, true, false, # booleans - "Hallo", "with < and >", "" # strings - ] - - v2 = [ - [v1, v1, v1], - {"a" => v1} - ] - - v3 = [ - XMLRPC::Base64.new("\001"*1000), # base64 - :aSymbol, :anotherSym # symbols (-> string) - ] - v3_exp = [ - "\001"*1000, - "aSymbol", "anotherSym" - ] - person = Person.new("Michael") - - XMLRPC::XMLParser.each_installed_parser do |parser| - m = XMLRPC::Marshal.new(parser) - - assert_equal( v1, m.load_response(m.dump_response(v1)) ) - assert_equal( v2, m.load_response(m.dump_response(v2)) ) - assert_equal( v3_exp, m.load_response(m.dump_response(v3)) ) - - pers = m.load_response(m.dump_response(person)) - - assert( pers.is_a?(Person) ) - assert( person.name == pers.name ) - end - - # missing, Date, Time, DateTime - # Struct - end - - def test_no_params_tag - # bug found by Idan Sofer - - expect = %{myMethod\n} - - str = XMLRPC::Marshal.dump_call("myMethod") - assert_equal(expect, str) - end - -end diff --git a/test/xmlrpc/test_parser.rb b/test/xmlrpc/test_parser.rb deleted file mode 100644 index 44ca1f88b7..0000000000 --- a/test/xmlrpc/test_parser.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'test/unit' -require 'xmlrpc/datetime' -require "xmlrpc/parser" -require 'yaml' - -module GenericParserTest - def datafile(base) - File.join(File.dirname(__FILE__), "data", base) - end - - def load_data(name) - [File.read(datafile(name) + ".xml"), YAML.load(File.read(datafile(name) + ".expected"))] - end - - def setup - @xml1, @expected1 = load_data('xml1') - @xml2, @expected2 = load_data('bug_covert') - @xml3, @expected3 = load_data('bug_bool') - @xml4, @expected4 = load_data('value') - - @cdata_xml, @cdata_expected = load_data('bug_cdata') - - @datetime_xml = File.read(datafile('datetime_iso8601.xml')) - @datetime_expected = XMLRPC::DateTime.new(2004, 11, 5, 1, 15, 23) - - @fault_doc = File.read(datafile('fault.xml')) - end - - # test parseMethodResponse -------------------------------------------------- - - def test_parseMethodResponse1 - assert_equal(@expected1, @p.parseMethodResponse(@xml1)) - end - - def test_parseMethodResponse2 - assert_equal(@expected2, @p.parseMethodResponse(@xml2)) - end - - def test_parseMethodResponse3 - assert_equal(@expected3, @p.parseMethodResponse(@xml3)) - end - - def test_cdata - assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml)) - end - - def test_dateTime - assert_equal(@datetime_expected, @p.parseMethodResponse(@datetime_xml)[1]) - end - - # test parseMethodCall ------------------------------------------------------ - - def test_parseMethodCall - assert_equal(@expected4, @p.parseMethodCall(@xml4)) - end - - # test fault ---------------------------------------------------------------- - - def test_fault - flag, fault = @p.parseMethodResponse(@fault_doc) - assert_equal(flag, false) - unless fault.is_a? XMLRPC::FaultException - assert(false, "must be an instance of class XMLRPC::FaultException") - end - assert_equal(fault.faultCode, 4) - assert_equal(fault.faultString, "an error message") - end -end - -# create test class for each installed parser -XMLRPC::XMLParser.each_installed_parser do |parser| - klass = parser.class - name = klass.to_s.split("::").last - - eval %{ - class Test_#{name} < Test::Unit::TestCase - include GenericParserTest - - def setup - super - @p = #{klass}.new - end - end - } -end diff --git a/win32/rm.bat b/win32/rm.bat deleted file mode 100755 index c7307617ee..0000000000 --- a/win32/rm.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off -::: $Id: rm.bat,v 1.1 2004/03/21 23:21:30 nobu Exp $ -if "%1" == "-f" shift -:begin -if "%1" == "" goto :end -if exist "%1" del "%1" -shift -goto :begin -:end -- cgit v1.2.3