From: Sean C. <the...@us...> - 2002-07-11 03:21:51
|
Update of /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests In directory usw-pr-cvs1:/tmp/cvs-serv25449/clients/rubynet/modules/tests Modified Files: tc_packageInstall.rb Log Message: *) Removed inline XML document in favor of an external filename/path to the standard trial package. This makes things slightly more fragile in you have to be in the src/ directory to run the unit tests at the moment. Index: tc_packageInstall.rb =================================================================== RCS file: /cvsroot/rubynet/rubynet/src/clients/rubynet/modules/tests/tc_packageInstall.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- tc_packageInstall.rb 11 Jul 2002 01:59:08 -0000 1.3 +++ tc_packageInstall.rb 11 Jul 2002 03:21:48 -0000 1.4 @@ -9,7 +9,7 @@ def test_package_file_opens install = Rubynet::Install::new('demo-package') - install.__send__(:locate_files, mock_package_file_data) + install.__send__(:collect_files, "../standards/package.xml") assert_equal(3, install.files.length, "There are not 3 files to install") end @@ -20,201 +20,4 @@ install.__send__(:write_local_db, MOCK_PACKAGE) end - - - - def mock_package_file_data - <<-EOS -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - -<!DOCTYPE rubynet [ -<!ELEMENT rubynet (pkg)> -<!ATTLIST rubynet xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"> -<!ELEMENT pkg (meta,dependencies?,files?)> -<!ATTLIST pkg version CDATA "1.0"> -<!ELEMENT meta (pkgname,authors,maintainers,categories,version,copyright,license,status,full_name,description,homepage,download)> - -<!ELEMENT pkgname (#PCDATA)> -<!ELEMENT authors (author*)> -<!ELEMENT author (name?,(first_name, last_name)?,email?,irc_network?,irc_channel?,irc_handle?)> -<!ELEMENT name (#PCDATA)> -<!ELEMENT email (#PCDATA)> -<!ELEMENT irc_network (#PCDATA)> -<!ELEMENT irc_channel (#PCDATA)> -<!ELEMENT irc_handle (#PCDATA)> - -<!ELEMENT maintainers (maintainer+)> -<!ELEMENT maintainer (name?,(first_name, last_name)?,email,irc_network?,irc_channel?,irc_handle?)> - -<!ELEMENT categories (major_category,minor_category*)> -<!ELEMENT major_category (#PCDATA)> -<!ATTLIST major_category - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> -<!ELEMENT minor_category (#PCDATA)> -<!ATTLIST minor_category - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> - -<!ELEMENT version (major_version,minor_version,micro_version)> -<!ELEMENT major_version (#PCDATA)> -<!ELEMENT minor_version (#PCDATA)> -<!ELEMENT micro_version (#PCDATA)> - -<!ELEMENT copyright (#PCDATA)> -<!ELEMENT license (#PCDATA)> -<!ELEMENT status (#PCDATA)> -<!ELEMENT full_name (#PCDATA)> -<!ELEMENT description (#PCDATA)> -<!ELEMENT homepage (#PCDATA)> -<!ATTLIST homepage - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> -<!ELEMENT download (#PCDATA)> -<!ATTLIST download - xlink:type (simple) #FIXED "simple" - xlink:href CDATA #REQUIRED> - -<!ELEMENT dependencies (dependency*)> -<!ELEMENT dependency (required_version)> -<!ATTLIST dependency - name CDATA #REQUIRED - uri CDATA #REQUIRED> -<!ELEMENT required_version (version?)> -<!ATTLIST required_version restriction (no-lower-than|no-greater-than|any) "any"> - -<!ELEMENT files (file*)> -<!ELEMENT file (filename, mode?, path, content)> -<!ELEMENT filename (#PCDATA)> -<!ELEMENT path (#PCDATA)> -<!ELEMENT mode (#PCDATA)> -<!ELEMENT content (#PCDATA)> -<!ATTLIST content encoding (xml|mime64) "xml"> - -<!ENTITY % rbconfig SYSTEM "rbconfig.xml"> -%rbconfig; -]> - - -<rubynet xmlns:xlink="http://www.w3.org/1999/xlink"> - <pkg version="1.0"> - <meta> - <pkgname>REXML</pkgname> - <authors> - <author> - <name>Aaron Malone</name> - <email>aa...@mu...</email> - <irc_network>irc.opentprojects.org</irc_network> - <irc_channel>#ruby-lang</irc_channel> - <irc_handle>AAmalone</irc_handle> - </author> - </authors> - <maintainers> - <maintainer> - <name>Tools Team</name> - <email>to...@ge...</email> - <irc_network>irc.opentprojects.org</irc_network> - <irc_channel>#ruby-lang</irc_channel> - <irc_handle>TinyT</irc_handle> - </maintainer> - </maintainers> - <categories> - <major_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/xml/">XML</major_category> - <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/text%20processing/">Text Processing</minor_category> - <minor_category xlink:type="simple" xlink:href="http://www.rubynet.org/category/storage/">Storage</minor_category> - </categories> - <version> - <major_version>1</major_version> - <minor_version>2</minor_version> - <micro_version>3</micro_version> - </version> - <copyright>1999-2002 Gentoo Technologies,Inc.</copyright> - <license>Ruby</license> - <status>Stable</status> - <full_name>Ruby Electric XML</full_name> - <description>Pure Ruby parser, blah blah. Based of Electrice XML</description> - <homepage xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/">REXML Home</homepage> - <download xlink:type="simple" xlink:href="http://www.germane-software.com/~ser/Software/rexml/rexml-1.2.3.bz2/">REXML Download</download> - </meta> - <dependencies> - <dependency name="ruby" uri="http://www.rubynet.org/packages/ruby/"> - <required_version restriction="no-lower-than"> - <version> - <major_version>1</major_version> - <minor_version>6</minor_version> - <micro_version>0</micro_version> - </version> - </required_version> - </dependency> - </dependencies> - <files> - <file> - <filename>uga.rb</filename> - <mode>0444</mode> - <path>&rbconfig.libdir;/rexml</path> - <content encoding="xml">... the file here</content> - </file> - <file> - <filename>booga.h</filename> - <mode>0444</mode> - <path>&rbconfig.includedir;</path> - <content encoding="xml">... the file here</content> - </file> - <file> - <filename>foo.so</filename> - <mode>0555</mode> - <path>&rbconfig.sitearchdir;/rexml</path> - <!-- Encode routine: str.to_a.pack('m') - Decode routine: str.unpack('m') --> - <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> - </file> - </files> - </pkg> -</rubynet> - EOS - end - - -# def mock_package_file_data -# <<-EOS -#<?xml version="1.0" encoding="UTF-8"?> -#<!DOCTYPE rubynet [ -#<!ENTITY rbconfig.MAJOR "1"> -#<!ENTITY rbconfig.MINOR "7"> -#<!ENTITY rbconfig.TEENY "2"> -#<!ENTITY rbconfig.ruby_version "&rbconfig.MAJOR;.&rbconfig.MINOR;"> -#<!ENTITY rbconfig.arch "i686"> -#<!ENTITY rbconfig.prefix "/tmp"> -#<!ENTITY rbconfig.libdir "&rbconfig.prefix;"> -#<!ENTITY rbconfig.includedir "&rbconfig.prefix;"> -#<!ENTITY rbconfig.sitedir "&rbconfig.prefix;"> -#<!ENTITY rbconfig.sitelibdir "&rbconfig.sitedir;"> -#<!ENTITY rbconfig.sitearchdir "&rbconfig.prefix;"> -#]> -#<rubynet> -# <pkg="version1.0"> -# <files> -# <file> -# <filename>uga.rb</filename> -# <mode>0444</mode> -# <path>&rbconfig.libdir;</path> -# <content encoding="xml">... the file here</content> -# </file> -# <file> -# <filename>booga.h</filename> -# <mode>0444</mode> -# <path>&rbconfig.includedir;</path> -# <content encoding="xml">... the file here</content> -# </file> -# <file> -# <filename>foo.so</filename> -# <mode>0555</mode> -# <path>&rbconfig.sitearchdir;</path> -# <content encoding="mime64">Li4uIHRoZSBmaWxlIGhlcmU=\n</content> -# </file> -# </files> -# </pkg> -#</rubynet> -# EOS -# end end |