Author: kkaempf Date: Thu Aug 7 18:31:57 2008 New Revision: 10790 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10790&view=rev Log: more tests Added: trunk/libzypp-bindings/swig/ruby/tests/arch.rb (with props) trunk/libzypp-bindings/swig/ruby/tests/target.rb (with props) Added: trunk/libzypp-bindings/swig/ruby/tests/arch.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ruby/tests/arch.rb?rev=10790&view=auto ============================================================================== --- trunk/libzypp-bindings/swig/ruby/tests/arch.rb (added) +++ trunk/libzypp-bindings/swig/ruby/tests/arch.rb Thu Aug 7 18:31:57 2008 @@ -0,0 +1,18 @@ +# +# Example for Arch +# + +$:.unshift "../../../build/swig/ruby" + +require 'test/unit' + +class LoadTest < Test::Unit::TestCase + require 'zypp' + include Zypp + def test_arch + a = Arch.new("i386") + assert a + puts a.to_s +# assert a.to_s == "i386" + end +end Added: trunk/libzypp-bindings/swig/ruby/tests/target.rb URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ruby/tests/target.rb?rev=10790&view=auto ============================================================================== --- trunk/libzypp-bindings/swig/ruby/tests/target.rb (added) +++ trunk/libzypp-bindings/swig/ruby/tests/target.rb Thu Aug 7 18:31:57 2008 @@ -0,0 +1,44 @@ +# +# Example for target +# + +$:.unshift "../../../build/swig/ruby" + + +# test loading of extension +require 'test/unit' + +class LoadTest < Test::Unit::TestCase + require 'zypp' + include Zypp + def test_target + z = ZYppFactory::instance.get_zypp + + assert z.home_path + assert z.tmp_path + + z.initialize_target(Zypp::Pathname.new("/")) + t = z.target + assert t + t.load + t.build_cache + + p = z.pool + assert p + assert p.size > 0 + + # Iterate over pool, gives PoolItems + i = 0 + puts "#{p.size} PoolItems:" + p.each do | pi | + i = i + 1 + break if i > 10 + puts pi + # PoolItems have status and a resolvable +# r = pi.resolvable +# puts "#{r.name}-#{r.edition}" + end + + assert true + end +end -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org