]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1707: output diff more for debugging differences in CI outputs
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Aug 2024 22:19:00 +0000 (00:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Aug 2024 06:57:19 +0000 (08:57 +0200)
tests/test1707.pl

index 65f9019efe19039435d4cd9c49117d047be9aa91..d9090d4f9be8a463a02621fc115e2939525e61a1 100755 (executable)
@@ -112,8 +112,22 @@ else {
         $txtout[$i] =~ s/[\r\n]//g;
         if($curlout[$i] ne $txtout[$i]) {
             printf "Line %d\n", $i;
-            printf "-h   : %s\n", $curlout[$i];
-            printf "file : %s\n", $txtout[$i];
+            printf "-h   : %s (%d bytes)\n", $curlout[$i],
+                length($curlout[$i]);
+            printf "file : %s (%d bytes)\n", $txtout[$i],
+                length($txtout[$i]);
+
+            if(length($curlout[$i]) == length($txtout[$i])) {
+                my $l = length($curlout[$i]);
+                for my $c (0 .. $l) {
+                    my $o = substr($curlout[$i], $c, 1);
+                    my $t = substr($txtout[$i], $c, 1);
+                    if($o ne $t) {
+                        print "-h   col %d: %02x\n", $c, ord($o);
+                        print "file col %d: %02x\n", $c, ord($t);
+                    }
+                }
+            }
             $error++;
         }
     }