[librsvg/rustification] rsvg-test: Ignore SVG fixtures that start with "ignore-"
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] rsvg-test: Ignore SVG fixtures that start with "ignore-"
- Date: Fri, 25 Nov 2016 22:38:19 +0000 (UTC)
commit ce4fc2c3cb29eff9e67aec31b7382ea1e14d4092
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Nov 22 09:00:56 2016 -0600
rsvg-test: Ignore SVG fixtures that start with "ignore-"
Right now pservers-grad-17-b.svg doesn't pass the tests, but I think it
may be a Cairo bug.
Add the ability to ignore test files if they have a "ignore-" filename
prefix. Hopefully I'll remember to fix this later...
...grad-17-b.svg => ignore-pservers-grad-17-b.svg} | 0
tests/rsvg-test.c | 8 ++++----
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-17-b.svg
b/tests/fixtures/reftests/svg1.1/ignore-pservers-grad-17-b.svg
similarity index 100%
rename from tests/fixtures/reftests/svg1.1/pservers-grad-17-b.svg
rename to tests/fixtures/reftests/svg1.1/ignore-pservers-grad-17-b.svg
diff --git a/tests/rsvg-test.c b/tests/rsvg-test.c
index 0f39f66..ab79b85 100644
--- a/tests/rsvg-test.c
+++ b/tests/rsvg-test.c
@@ -173,15 +173,15 @@ save_image (cairo_surface_t *surface,
static gboolean
is_svg_or_subdir (GFile *file)
{
- char *uri;
+ char *basename;
gboolean result;
if (g_file_query_file_type (file, 0, NULL) == G_FILE_TYPE_DIRECTORY)
return TRUE;
- uri = g_file_get_uri (file);
- result = g_str_has_suffix (uri, ".svg");
- g_free (uri);
+ basename = g_file_get_basename (file);
+ result = !g_str_has_prefix (basename, "ignore-") && g_str_has_suffix (basename, ".svg");
+ g_free (basename);
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]