Skip to content

Commit d92769d

Browse files
committed
trying again to make Mac work
1 parent 17896a4 commit d92769d

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

t/10_baseline_ipv4_http.t

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,43 +54,43 @@ unlike($json_string, qr/$json_errors/, "via sockets checking JSON output");
5454
$tests++;
5555

5656
#3
57-
if ( $os eq "linux" ){
58-
unlink $json_file;
59-
$terminal_out = `$prg --ssl-native $check2run $json_file $uri 2>&1`;
60-
$json_string = json($json_file);
61-
unlike($terminal_out, qr/$openssl_errors/, "via (builtin) OpenSSL, checking terminal output");
62-
} elsif ( $os eq "darwin" ){
63-
printf "%s\n", "Skipping test. The result of the check under MacOS is not understood" ;
64-
}
57+
unlink $json_file;
58+
$terminal_out = `$prg --ssl-native $check2run $json_file $uri 2>&1`;
59+
$json_string = json($json_file);
60+
unlike($terminal_out, qr/$openssl_errors/, "via (builtin) OpenSSL, checking terminal output");
6561
$tests++;
6662

6763
#4
6864
unlike($json_string, qr/$json_errors/, "via OpenSSL (builtin) checking JSON output");
6965
$tests++;
7066

71-
#5 -- early data test. We just take the last check
72-
my $found=0;
73-
open my $fh, '<', $json_file or die "Can't open '$json_file': $!";
74-
local $/; # undef slurp mode
75-
my $data = decode_json(<$fh>);
76-
close $fh;
77-
78-
# Check if the decoded data is an array
79-
if (ref $data eq 'ARRAY') {
80-
# Iterate through the array of JSON objects
81-
foreach my $obj (@$data) {
82-
# Check if the 'id' is "early_data" and 'severity' is "HIGH"
83-
if ($obj->{id} eq 'early_data' && $obj->{severity} eq 'HIGH') {
84-
$found=1;
85-
last; # we can leave the loop
67+
if ( $os eq "linux" ){
68+
#5 -- early data test. We just take the last check
69+
my $found=0;
70+
open my $fh, '<', $json_file or die "Can't open '$json_file': $!";
71+
local $/; # undef slurp mode
72+
my $data = decode_json(<$fh>);
73+
close $fh;
74+
75+
# Check if the decoded data is an array
76+
if (ref $data eq 'ARRAY') {
77+
# Iterate through the array of JSON objects
78+
foreach my $obj (@$data) {
79+
# Check if the 'id' is "early_data" and 'severity' is "HIGH"
80+
if ($obj->{id} eq 'early_data' && $obj->{severity} eq 'HIGH') {
81+
$found=1;
82+
last; # we can leave the loop
83+
}
8684
}
8785
}
88-
}
8986

90-
if ($found) {
91-
ok(1, "0‑RTT found in JSON from $uri");
92-
} else {
93-
fail("0‑RTT test for $uri failed");
87+
if ($found) {
88+
ok(1, "0‑RTT found in JSON from $uri");
89+
} else {
90+
fail("0‑RTT test for $uri failed");
91+
}
92+
} elsif ( $os eq "darwin" ){
93+
printf "%s\n", "Skipping test. The result of the check under MacOS is not understood" ;
9494
}
9595
$tests++;
9696

0 commit comments

Comments
 (0)