From: Paul Eggert Date: Sat, 28 Oct 2023 23:15:49 +0000 (-0700) Subject: test: allow non-blank white space in numbers X-Git-Tag: v9.5~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2709bea0f440507ac009e6e7ded453bb792d6842;p=thirdparty%2Fcoreutils.git test: allow non-blank white space in numbers * src/test.c (find_int): Use isspace, not isblank, for compatibility with how strtol works, which is how most other shells do this. --- diff --git a/src/test.c b/src/test.c index 2bcb9abc8c..4f14e40800 100644 --- a/src/test.c +++ b/src/test.c @@ -136,7 +136,7 @@ find_int (char const *string) char const *p; char const *number_start; - for (p = string; isblank (to_uchar (*p)); p++) + for (p = string; isspace (to_uchar (*p)); p++) continue; if (*p == '+') @@ -154,7 +154,7 @@ find_int (char const *string) { while (ISDIGIT (*p)) p++; - while (isblank (to_uchar (*p))) + while (isspace (to_uchar (*p))) p++; if (!*p) return number_start;