Skip Menu |

This queue is for tickets about the Gtk2 CPAN distribution.

Report information
The Basics
Id: 37135
Status: resolved
Priority: 0/
Queue: Gtk2

People
Owner: Nobody in particular
Requestors: polettix [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: make a test nice with some gtk library installations
While installing Gtk2, I had this error: shell$ prove -b t/GdkPixbuf.t t/GdkPixbuf......1/103 Image type 'jpeg' is not supported at t/GdkPixbuf.t line 414. # Looks like you planned 103 tests but only ran 100. # Looks like your test died just after 100. [...] It seems that the library installation that comes with debian etch doesn't support jpeg. I'm attaching a patch to make the test fallback to png if jpeg is an issue. Cheers, Flavio.
Subject: Gtk2.patch
diff -u orig/t/GdkPixbuf.t patched/t/GdkPixbuf.t --- orig/t/GdkPixbuf.t 2008-05-23 00:09:48.000000000 +0200 +++ patched/t/GdkPixbuf.t 2008-06-26 18:14:03.000000000 +0200 @@ -411,7 +411,11 @@ my $data = pack "C*", map { int rand 255 } 0..(3*$width*$height); my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_data ($data, 'rgb', FALSE, 8, $width, $height, $width*3); - my $buffer = $pixbuf->save_to_buffer ('jpeg', quality => 0.75); + my $buffer = eval { + $pixbuf->save_to_buffer ('jpeg', quality => 0.75); + } || eval { + $pixbuf->save_to_buffer ('png'); # fallback if jpeg not supported + }; ok ($buffer, 'save_to_buffer'); my $loader = Gtk2::Gdk::PixbufLoader->new;
On Thu Jun 26 12:21:32 2008, POLETTIX wrote: Show quoted text
> While installing Gtk2, I had this error: > > shell$ prove -b t/GdkPixbuf.t > t/GdkPixbuf......1/103 Image type 'jpeg' is not supported at > t/GdkPixbuf.t line 414. > # Looks like you planned 103 tests but only ran 100. > # Looks like your test died just after 100. > [...] > > > It seems that the library installation that comes with debian etch > doesn't support jpeg. I'm attaching a patch to make the test fallback to > png if jpeg is an issue.
Sorry for the late reply, and thanks for the patch! Committed to CVS.