diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-01-10 16:53:37 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-01-10 16:53:37 +0900 |
commit | bc07cc788d0d5d0fda06dddc8b05a01678896162 (patch) | |
tree | 35db4d4d56a0cde59c74bcb26152e5cfd42a42d3 | |
parent | 0190e8092e25e3fc59b9551883baab3ef6d8ddbf (diff) | |
download | libzypp-bindings-bc07cc788d0d5d0fda06dddc8b05a01678896162.tar.gz libzypp-bindings-bc07cc788d0d5d0fda06dddc8b05a01678896162.tar.bz2 libzypp-bindings-bc07cc788d0d5d0fda06dddc8b05a01678896162.zip |
Imported Upstream version 0.7.1
Change-Id: Ieb7db8afb33924ce2e1f7b5b5476c06d6b613405
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r-- | VERSION.cmake | 2 | ||||
-rw-r--r-- | package/libzypp-bindings.changes | 6 | ||||
-rw-r--r-- | swig/ruby/tests/arch.rb | 31 | ||||
-rw-r--r-- | swig/ruby/tests/bytecount.rb | 9 | ||||
-rw-r--r-- | swig/ruby/tests/target.rb | 15 |
5 files changed, 33 insertions, 30 deletions
diff --git a/VERSION.cmake b/VERSION.cmake index fbe1f83..9b57953 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -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") diff --git a/package/libzypp-bindings.changes b/package/libzypp-bindings.changes index bc9ca92..9cbb466 100644 --- a/package/libzypp-bindings.changes +++ b/package/libzypp-bindings.changes @@ -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 diff --git a/swig/ruby/tests/arch.rb b/swig/ruby/tests/arch.rb index 3e2f508..eafca1b 100644 --- a/swig/ruby/tests/arch.rb +++ b/swig/ruby/tests/arch.rb @@ -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 diff --git a/swig/ruby/tests/bytecount.rb b/swig/ruby/tests/bytecount.rb index 5b46e14..bda6f0a 100644 --- a/swig/ruby/tests/bytecount.rb +++ b/swig/ruby/tests/bytecount.rb @@ -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 diff --git a/swig/ruby/tests/target.rb b/swig/ruby/tests/target.rb index 7594c79..1b8e45b 100644 --- a/swig/ruby/tests/target.rb +++ b/swig/ruby/tests/target.rb @@ -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 |