aboutsummaryrefslogtreecommitdiffstats
path: root/libtests
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-02 01:55:43 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-02 01:55:52 +0200
commitf5dd63819d9f0cab89d8558b3b9c596e5056c9b7 (patch)
treedf595d8b8cae22cfaef66de2d9a370a6797ccfc2 /libtests
parentab01045bcdb6ec7555fe0364d75139fcfa361991 (diff)
downloadqpdf-f5dd63819d9f0cab89d8558b3b9c596e5056c9b7.tar.zst
Windows perl workaround
Diffstat (limited to 'libtests')
-rw-r--r--libtests/qtest/json_parse.test21
1 files changed, 15 insertions, 6 deletions
diff --git a/libtests/qtest/json_parse.test b/libtests/qtest/json_parse.test
index d97b05cb..cdafb506 100644
--- a/libtests/qtest/json_parse.test
+++ b/libtests/qtest/json_parse.test
@@ -12,13 +12,22 @@ require TestDriver;
my $td = new TestDriver('json_parse');
my $json_mod = 0;
-eval {
- require JSON;
- $json_mod = 1;
-};
-if ($@)
+if ($^O ne 'msys')
{
- $td->emphasize("JSON.pm not found -- using stored actual outputs");
+ # Emperical evidence and considerable debugging reveals that in
+ # some versions of perl (e.g. the one with git bash on the GitHub
+ # actions Windows 2022 build environment), using the JSON module
+ # defeats the functionality of binmode when writing test output
+ # files, thus invalidating NORMALIZE_NEWLINES. This causes test
+ # failures and spurious upadtes to save files in CI on MSVC.
+ eval {
+ require JSON;
+ $json_mod = 1;
+ };
+ if ($@)
+ {
+ $td->emphasize("JSON.pm not found -- using stored actual outputs");
+ }
}
cleanup();