tags 666632 patch fixed-upstream
thanks

Hi,

this test failure is harmless. It's just cairo changing its behavior.

Fix can be found here (and in the attachment):
http://git.naquadah.org/?p=oocairo.git;a=commitdiff;h=d6c087dcf9557ecb16bc4741b2e47de0bb90c14b

Cheers,
Uli
-- 
"In the beginning the Universe was created. This has made a lot of
 people very angry and has been widely regarded as a bad move."
>From d6c087dcf9557ecb16bc4741b2e47de0bb90c14b Mon Sep 17 00:00:00 2001
From: Uli Schlachter <psyc...@znc.in>
Date: Fri, 10 Feb 2012 18:09:23 +0100
Subject: [PATCH] Tests: Fix for cairo 1.12.0

cairo recently (and accidentally?) changed its behavior and now the test fails.

Signed-off-by: Uli Schlachter <psyc...@znc.in>
---
 test/surface.lua |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/test/surface.lua b/test/surface.lua
index 73fe9a5..12108b0 100644
--- a/test/surface.lua
+++ b/test/surface.lua
@@ -299,7 +299,9 @@ if Cairo.check_version(1, 10, 0) then
     function test_subsurface()
         local surface = Cairo.image_surface_create("rgb24", 23, 45)
         local sub = surface:create_for_rectangle(10, 11, 12, 13)
-        assert_equal("subsurface", sub:get_type())
+        local sub_type = sub:get_type()
+        -- This if is needed because of cairo commit ba855a12e8d686f2137f82d3177
+        assert_true(sub_type == "subsurface" or sub_type == "image")
         assert_error(function() sub:create_for_rectangle(0, 0, -1, -1) end)
     end
 end
-- 
1.7.9.1

Reply via email to