From: Michael Wallner Date: Mon, 3 Jan 2022 22:55:06 +0000 (+0100) Subject: tests: do not depend on ctype X-Git-Tag: v0.1.0~50 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ba488d2ae10114ccff6fd6ef3566fe47c571cdc3;p=awesomized%2Fext-ion tests: do not depend on ctype --- 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"; }