[librsvg: 4/8] rsvg-convert: Test that invalid language tags yield an error for --accept-language
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 4/8] rsvg-convert: Test that invalid language tags yield an error for --accept-language
- Date: Wed, 7 Jul 2021 23:20:26 +0000 (UTC)
commit a4c4824e16df662ec02c52a740803b669461e689
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Jul 7 15:04:35 2021 -0500
rsvg-convert: Test that invalid language tags yield an error for --accept-language
tests/src/cmdline/rsvg_convert.rs | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index fa99bff1..726b20ef 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -849,6 +849,16 @@ fn accept_language_fallback() {
);
}
+#[test]
+fn accept_language_invalid_tag() {
+ // underscores are not valid in BCP47 language tags
+ RsvgConvert::new_with_input("tests/fixtures/cmdline/accept-language.svg")
+ .arg("--accept-language=foo_bar")
+ .assert()
+ .failure()
+ .stderr(contains("invalid language tag"));
+}
+
#[test]
fn keep_image_data_option() {
RsvgConvert::accepts_arg("--keep-image-data");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]