mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 17:10:11 +01:00
Merge branch 'pdf-mime-data' into 'master'
"Fix" the pdf-mime-data test See merge request cairo/cairo!142
This commit is contained in:
commit
33cce5dc37
1 changed files with 8 additions and 2 deletions
|
|
@ -112,7 +112,13 @@ preamble (cairo_test_context_t *ctx)
|
|||
if (! cairo_test_is_target_enabled (ctx, "pdf"))
|
||||
return CAIRO_TEST_UNTESTED;
|
||||
|
||||
image = cairo_image_surface_create_from_png (IMAGE_FILE ".png");
|
||||
exit_status = system ("command -v pdfimages");
|
||||
if (exit_status) {
|
||||
cairo_test_log (ctx, "pdfimages not available\n");
|
||||
return CAIRO_TEST_UNTESTED;
|
||||
}
|
||||
|
||||
image = cairo_test_create_surface_from_png (ctx, IMAGE_FILE ".png");
|
||||
test_status = read_file (ctx, IMAGE_FILE ".jpg", &data, &len);
|
||||
if (test_status) {
|
||||
return test_status;
|
||||
|
|
@ -134,7 +140,7 @@ preamble (cairo_test_context_t *ctx)
|
|||
cairo_destroy (cr);
|
||||
cairo_surface_finish (surface);
|
||||
status2 = cairo_surface_status (surface);
|
||||
if (status != CAIRO_STATUS_SUCCESS)
|
||||
if (status == CAIRO_STATUS_SUCCESS)
|
||||
status = status2;
|
||||
cairo_surface_destroy (surface);
|
||||
cairo_surface_destroy (image);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue