[librsvg/librsvg-2.52: 11/21] New test to ensure an output PDF has textual content
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.52: 11/21] New test to ensure an output PDF has textual content
- Date: Fri, 11 Mar 2022 20:37:22 +0000 (UTC)
commit 5a33e0bfe3fd6d5d467c04d9b573d2ba42e36204
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Mar 8 17:25:27 2022 -0600
New test to ensure an output PDF has textual content
... as opposed to all text rendered as paths.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/673>
tests/src/cmdline/rsvg_convert.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index ed79f7efd..b263d900b 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -411,6 +411,22 @@ fn pdf_has_link_inside_text() {
);
}
+#[cfg(system_deps_have_cairo_pdf)]
+#[test]
+fn pdf_has_text() {
+ let input = Path::new("tests/fixtures/text/hello-world.svg");
+ RsvgConvert::new()
+ .arg("--format=pdf")
+ .arg(input)
+ .assert()
+ .success()
+ .stdout(
+ file::is_pdf()
+ .with_text("Hello world!")
+ .and(file::is_pdf().with_text("Hello again!")),
+ );
+}
+
#[cfg(system_deps_have_cairo_pdf)]
#[test]
fn env_source_data_epoch_controls_pdf_creation_date() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]