Merge branch 'pdf-mime-data' into 'master'

"Fix" the pdf-mime-data test

See merge request cairo/cairo!142
This commit is contained in:
Uli Schlachter 2021-03-25 15:51:13 +00:00
commit 33cce5dc37

View file

@ -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);