[DRE-commits] [ruby-rbpdf] 03/25: run tests with rake

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Feb 14 15:56:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-rbpdf.

commit 5adb2846990724d88af857df4de2d62868e0f66c
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Sat Jan 23 12:14:56 2016 -0200

    run tests with rake
---
 ...related-to-alpha-channel-support-in-rmagi.patch | 43 ++++++++++++----------
 debian/ruby-tests.rake                             |  6 +++
 debian/ruby-tests.rb                               |  7 ----
 3 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/debian/patches/0001-Skip-tests-related-to-alpha-channel-support-in-rmagi.patch b/debian/patches/0001-Skip-tests-related-to-alpha-channel-support-in-rmagi.patch
index 3bc8a37..197c06f 100644
--- a/debian/patches/0001-Skip-tests-related-to-alpha-channel-support-in-rmagi.patch
+++ b/debian/patches/0001-Skip-tests-related-to-alpha-channel-support-in-rmagi.patch
@@ -3,34 +3,37 @@ Date: Sat, 23 Jan 2016 12:04:57 -0200
 Subject: Skip tests related to alpha channel support in rmagick
 
 ---
- test/rbpdf_image_rmagick_test.rb | 3 +++
- 1 file changed, 3 insertions(+)
+ test/rbpdf_image_rmagick_test.rb | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/test/rbpdf_image_rmagick_test.rb b/test/rbpdf_image_rmagick_test.rb
-index d6277e2..abd2cad 100644
+index d6277e2..13dec1b 100644
 --- a/test/rbpdf_image_rmagick_test.rb
 +++ b/test/rbpdf_image_rmagick_test.rb
-@@ -160,6 +160,7 @@ class RbpdfTest < Test::Unit::TestCase
-   end
+@@ -174,7 +174,7 @@ class RbpdfTest < Test::Unit::TestCase
+       assert_equal info['bpc'], 8
+       assert_equal info['cs'], 'Indexed'
+     end
+-  end
++  end if false
  
-   test "imageToPNG delete GIF alpha channel test" do
-+    skip
+   test "imageToPNG delete PNG alpha channel test" do
      pdf = MYPDF.new
-     pdf.add_page
-     img_file = File.join(File.dirname(__FILE__), 'logo_rbpdf_8bit_alpha.gif')
-@@ -177,6 +178,7 @@ class RbpdfTest < Test::Unit::TestCase
-   end
+@@ -191,7 +191,7 @@ class RbpdfTest < Test::Unit::TestCase
+       assert_equal info['bpc'], 8
+       assert_equal info['cs'], 'DeviceRGB'
+     end
+-  end
++  end if false
  
-   test "imageToPNG delete PNG alpha channel test" do
-+    skip
+   test "image_alpha_mask DeviceGray test" do
      pdf = MYPDF.new
-     pdf.add_page
+@@ -225,7 +225,7 @@ class RbpdfTest < Test::Unit::TestCase
      img_file = File.join(File.dirname(__FILE__), 'png_test_alpha.png')
-@@ -218,6 +220,7 @@ class RbpdfTest < Test::Unit::TestCase
-   end
+     info = pdf.image(img_file, 10, 10, 100, '', '', 'https://rubygems.org/gems/rbpdf', '', false, 300)
+     assert_equal info, true
+-  end
++  end if false
  
-   test "Image PNG alpha test" do
-+    skip
+   test "Image GIF test" do
      return unless Object.const_defined?(:Magick)
- 
-     pdf = RBPDF.new
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
new file mode 100644
index 0000000..63f3fd6
--- /dev/null
+++ b/debian/ruby-tests.rake
@@ -0,0 +1,6 @@
+require 'gem2deb/rake/testtask'
+
+Gem2Deb::Rake::TestTask.new do |t|
+  t.libs = ['test']
+  t.test_files = FileList['test/**/*_test.rb'] + FileList['test/**/test_*.rb']
+end
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
deleted file mode 100644
index 3303f40..0000000
--- a/debian/ruby-tests.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
-$:.unshift File.join(File.dirname(__FILE__), "..", "test")
-$:.unshift File.join(File.dirname(__FILE__), "..")
-
-gem "minitest"
-require "minitest/autorun"
-Dir["test/**/*_test.rb"].each{|f| require f}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rbpdf.git



More information about the Pkg-ruby-extras-commits mailing list