From ba488d2ae10114ccff6fd6ef3566fe47c571cdc3 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 3 Jan 2022 23:55:06 +0100 Subject: [PATCH] tests: do not depend on ctype --- tests/Symbol/Table/Local.phpt | 2 +- tests/Symbol/Table/Shared.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Symbol/Table/Local.phpt b/tests/Symbol/Table/Local.phpt index 19a368e..25b0cb5 100644 --- a/tests/Symbol/Table/Local.phpt +++ b/tests/Symbol/Table/Local.phpt @@ -19,7 +19,7 @@ $w->finish(); foreach (str_split($buf, 8) as $line) { printf("%-26s", chunk_split(bin2hex($line), 2, " ")); foreach (str_split($line) as $byte) { - echo ctype_print($byte) ? $byte : "."; + echo $byte >= ' ' && $byte <= '~' ? $byte : "."; } echo "\n"; } diff --git a/tests/Symbol/Table/Shared.phpt b/tests/Symbol/Table/Shared.phpt index 4227bdd..b6a2a48 100644 --- a/tests/Symbol/Table/Shared.phpt +++ b/tests/Symbol/Table/Shared.phpt @@ -21,7 +21,7 @@ $w->finish(); foreach (str_split($buf, 8) as $line) { printf("%-26s", chunk_split(bin2hex($line), 2, " ")); foreach (str_split($line) as $byte) { - echo ctype_print($byte) ? $byte : "."; + echo $byte >= ' ' && $byte <= '~' ? $byte : "."; } echo "\n"; } -- 2.30.2