summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-05-19 09:37:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-05-20 08:32:38 +0200
commit1f90d08371b3d96e081fc03d5323f1e5fcd5297b (patch)
tree93d7640a51273b13f467f64eb1c2330e38222595
parentd845d392b5ada2259da6d48062dd309045efd3ab (diff)
downloadcurl-1f90d08371b3d96e081fc03d5323f1e5fcd5297b.tar.gz
tests/getpart: generate output URL encoded for better diffs
Closes #7083
-rw-r--r--tests/getpart.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm
index 5700ca7a0..348bdd44d 100644
--- a/tests/getpart.pm
+++ b/tests/getpart.pm
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -313,6 +313,7 @@ sub showdiff {
my $l = $_;
$l =~ s/\r/[CR]/g;
$l =~ s/\n/[LF]/g;
+ $l =~ s/([^\x20-\x7f])/sprintf "%%%02x", ord $1/eg;
print TEMP $l;
print TEMP "\n";
}
@@ -323,6 +324,7 @@ sub showdiff {
my $l = $_;
$l =~ s/\r/[CR]/g;
$l =~ s/\n/[LF]/g;
+ $l =~ s/([^\x20-\x7f])/sprintf "%%%02x", ord $1/eg;
print TEMP $l;
print TEMP "\n";
}