Verified Commit 32443e92 authored by Iain Lane's avatar Iain Lane

Take patch from upstream MR !22 to fix whitespace assumption in test

Since GLib 2.59.1, g_format_size() started using non-breaking spaces
instead of regular ones to separate the size from the unit. deja-dup was
only testing for the latter. Update the test to use a regex with `\s`,
so we match all types of whitespace.
parent 5a9aec88
From: Iain Lane <iainl@gnome.org>
Date: Wed, 10 Apr 2019 11:56:09 +0100
Subject: disk-small test: Use ErrorRegex and match any whitespace
GLib 3da40e90366820b1dd75769a67a3cbe2098334b7 (2.59.1) introduced the
use of non-breaking spaces between the size and units when using
g_format_size(). We were checking for a normal space only, so this test
started failing.
Use a regular expression and match any kind of whitespace there.
Forwarded: https://gitlab.gnome.org/World/deja-dup/merge_requests/22
Origin: https://gitlab.gnome.org/iainl/deja-dup/commit/92adf7ffc71e4bcd7f899799405b46a8805aa0f8
---
libdeja/tests/scripts/disk-small.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdeja/tests/scripts/disk-small.test b/libdeja/tests/scripts/disk-small.test
index 028605b..6043111 100644
--- a/libdeja/tests/scripts/disk-small.test
+++ b/libdeja/tests/scripts/disk-small.test
@@ -4,7 +4,7 @@
[Operation]
Type=backup
Success=false
-Error=Backup location is too small. Try using one with at least 1000.0 TB.
+ErrorRegex=Backup location is too small\\. Try using one with at least 1000.0\\sTB\\.
[Duplicity]
Runs=status;dry;
test-runner-Ensure-outputscript-ends-with-n-n.patch
disk-small-test-Use-ErrorRegex-and-match-any-whitespace.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment