[librsvg: 45/48] Add tests for xi:include in text mode
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 45/48] Add tests for xi:include in text mode
- Date: Sat, 17 Nov 2018 10:23:48 +0000 (UTC)
commit f5e43888beeafa62302278ee392b4860e95f5902
Author: Federico Mena Quintero <federico gnome org>
Date: Sat Nov 17 03:14:21 2018 -0600
Add tests for xi:include in text mode
tests/Makefile.am | 1 +
tests/fixtures/reftests/include-fallback-ref.png | Bin 0 -> 1093 bytes
tests/fixtures/reftests/include-fallback.svg | 10 ++++++++++
tests/fixtures/reftests/include-text-ref.png | Bin 0 -> 940 bytes
tests/fixtures/reftests/include-text.svg | 6 ++++++
tests/fixtures/reftests/text.txt | 1 +
6 files changed, 18 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 40ac1b51..efcbbe6a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -80,6 +80,7 @@ dist_installed_test_data = \
$(wildcard $(srcdir)/fixtures/reftests/*.css) \
$(wildcard $(srcdir)/fixtures/reftests/*.svg) \
$(wildcard $(srcdir)/fixtures/reftests/*.png) \
+ $(wildcard $(srcdir)/fixtures/reftests/*.txt) \
$(wildcard $(srcdir)/fixtures/reftests/bugs/*.svg) \
$(wildcard $(srcdir)/fixtures/reftests/bugs/*.png) \
$(wildcard $(srcdir)/fixtures/reftests/svg1.1/*.svg) \
diff --git a/tests/fixtures/reftests/include-fallback-ref.png
b/tests/fixtures/reftests/include-fallback-ref.png
new file mode 100644
index 00000000..9c7b4ecd
Binary files /dev/null and b/tests/fixtures/reftests/include-fallback-ref.png differ
diff --git a/tests/fixtures/reftests/include-fallback.svg b/tests/fixtures/reftests/include-fallback.svg
new file mode 100644
index 00000000..a471d83d
--- /dev/null
+++ b/tests/fixtures/reftests/include-fallback.svg
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ width="320" height="240">
+ <text x="10" y="100">
+ <xi:include href="nonexistent.txt" parse="text" encoding="UTF-8">
+ <xi:fallback>Hello fallback!</xi:fallback>
+ </xi:include>
+ </text>
+</svg>
diff --git a/tests/fixtures/reftests/include-text-ref.png b/tests/fixtures/reftests/include-text-ref.png
new file mode 100644
index 00000000..92a955c7
Binary files /dev/null and b/tests/fixtures/reftests/include-text-ref.png differ
diff --git a/tests/fixtures/reftests/include-text.svg b/tests/fixtures/reftests/include-text.svg
new file mode 100644
index 00000000..181a25cb
--- /dev/null
+++ b/tests/fixtures/reftests/include-text.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ width="320" height="240">
+ <text x="10" y="100"><xi:include href="text.txt" parse="text" encoding="UTF-8"/></text>
+</svg>
diff --git a/tests/fixtures/reftests/text.txt b/tests/fixtures/reftests/text.txt
new file mode 100644
index 00000000..802992c4
--- /dev/null
+++ b/tests/fixtures/reftests/text.txt
@@ -0,0 +1 @@
+Hello world
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]