Imported Upstream version 0.7.1 02/109502/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 10 Jan 2017 07:53:37 +0000 (16:53 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 10 Jan 2017 07:53:37 +0000 (16:53 +0900)
Change-Id: Ieb7db8afb33924ce2e1f7b5b5476c06d6b613405
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
VERSION.cmake
package/libzypp-bindings.changes
swig/ruby/tests/arch.rb
swig/ruby/tests/bytecount.rb
swig/ruby/tests/target.rb

index fbe1f83..9b57953 100644 (file)
@@ -1,4 +1,4 @@
 # on maintenance branch add a 2nd level to patch (p.1, p.2, ...)
 SET(VERSION_MAJOR "0")
 SET(VERSION_MINOR "7")
-SET(VERSION_PATCH "0")
+SET(VERSION_PATCH "1")
index bc9ca92..9cbb466 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu May 21 13:09:43 CEST 2015 - ma@suse.de
+
+- Fix test to run with ruby-2.2
+- 0.7.1
+
+-------------------------------------------------------------------
 Mon May  4 10:17:32 CEST 2015 - ma@suse.de
 
 - Adapt to libzypp-15.x
index 3e2f508..eafca1b 100644 (file)
@@ -12,44 +12,43 @@ class Zypp::Arch
 end
 
 class ArchTest < Test::Unit::TestCase
-  include Zypp
   def test_arch
     # define i386, a builtin
     
-    a = Arch.new("i386")
+    a = Zypp::Arch.new("i386")
     assert a
     assert_equal "i386", a.to_s
     assert_equal true, a.is_builtin
     
     # i486 is 'bigger' than i386
     
-    b = Arch.new("i486")
+    b = Zypp::Arch.new("i486")
     assert b
     assert_equal "i486", b.to_s
     assert b.is_builtin
-    if VERSION > 800
+    if Zypp::VERSION > 800
       assert_equal a, b.base_arch
     end
     assert a < b
     assert a.compatible_with?(b)
 
     # A new, adventurous architecture
-    z = Arch.new("xyzzy")
+    z = Zypp::Arch.new("xyzzy")
     assert z
     assert_equal "xyzzy", z.to_s
     assert_equal false, z.is_builtin
     
     # predefined archs
-    assert_equal Arch.new("noarch"), Arch.noarch 
-    assert_equal a, Arch.i386
-    assert_equal b, Arch.i486
-    assert_equal Arch.new("i586"), Arch.i586
-    assert_equal Arch.new("i686"), Arch.i686
-    assert_equal Arch.new("x86_64"), Arch.x86_64
-    assert_equal Arch.new("ia64"), Arch.ia64
-    assert_equal Arch.new("ppc"), Arch.ppc
-    assert_equal Arch.new("ppc64"), Arch.ppc64
-    assert_equal Arch.new("s390"), Arch.s390
-    assert_equal Arch.new("s390x"), Arch.s390x
+    assert_equal Zypp::Arch.new("noarch"), Zypp::Arch.noarch 
+    assert_equal a, Zypp::Arch.i386
+    assert_equal b, Zypp::Arch.i486
+    assert_equal Zypp::Arch.new("i586"), Zypp::Arch.i586
+    assert_equal Zypp::Arch.new("i686"), Zypp::Arch.i686
+    assert_equal Zypp::Arch.new("x86_64"), Zypp::Arch.x86_64
+    assert_equal Zypp::Arch.new("ia64"), Zypp::Arch.ia64
+    assert_equal Zypp::Arch.new("ppc"), Zypp::Arch.ppc
+    assert_equal Zypp::Arch.new("ppc64"), Zypp::Arch.ppc64
+    assert_equal Zypp::Arch.new("s390"), Zypp::Arch.s390
+    assert_equal Zypp::Arch.new("s390x"), Zypp::Arch.s390x
   end
 end
index 5b46e14..bda6f0a 100644 (file)
@@ -10,16 +10,15 @@ require 'test/unit'
 
 class LoadTest < Test::Unit::TestCase
   require 'zypp'
-  include Zypp
 
   def test_bytecount
-    g = ByteCount.new(ByteCount.G)
+    g = Zypp::ByteCount.new(Zypp::ByteCount.G)
     assert g
-    gb = ByteCount.new(ByteCount.GB)
+    gb = Zypp::ByteCount.new(Zypp::ByteCount.GB)
     assert gb
-    k = ByteCount.new(ByteCount.K)
+    k = Zypp::ByteCount.new(Zypp::ByteCount.K)
     assert k.to_i == 1024
-    mb = ByteCount.new(ByteCount.MB)
+    mb = Zypp::ByteCount.new(Zypp::ByteCount.MB)
     assert mb.to_i == 1000*1000
   end
 end
index 7594c79..1b8e45b 100644 (file)
@@ -7,12 +7,11 @@ $:.unshift "../../../build/swig/ruby"
 
 # test loading of extension
 require 'test/unit'
+require 'zypp'
 
 class LoadTest < Test::Unit::TestCase
-  require 'zypp'
-  include Zypp
   def test_target
-    z = ZYppFactory::instance.getZYpp
+    z = Zypp::ZYppFactory::instance.getZYpp
 
     assert z.homePath
     assert z.tmpPath
@@ -35,17 +34,17 @@ class LoadTest < Test::Unit::TestCase
       break if i > 10
       # PoolItems have status and a resolvable
       r = pi.resolvable
-      assert pi.is_a? PoolItem
+      assert pi.is_a? Zypp::PoolItem
     end
     #try iterate with kind
     i = 0
-    p.each_by_kind(ResKind.package) do |pi|
+    p.each_by_kind(Zypp::ResKind.package) do |pi|
       
       i = i + 1
       break if i > 10
-      assert pi.is_a? PoolItem
+      assert pi.is_a? Zypp::PoolItem
       r = pi.resolvable
-      assert isKindPackage(pi)
+      assert Zypp::isKindPackage(pi)
     end
 
     i = 0
@@ -53,7 +52,7 @@ class LoadTest < Test::Unit::TestCase
     p.each_by_name("libzypp") do |pi|
       i = i + 1
       break if i > 10
-      assert pi.is_a? PoolItem
+      assert pi.is_a? Zypp::PoolItem
       r = pi.resolvable
       # broken in current SWIG assert_equal "libzypp",r.name
       #try to download it