summaryrefslogtreecommitdiff
path: root/test/teststr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/teststr.c')
-rw-r--r--test/teststr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/teststr.c b/test/teststr.c
index 2121da41a..99aa8af41 100644
--- a/test/teststr.c
+++ b/test/teststr.c
@@ -150,6 +150,7 @@ static void snprintf_underflow(abts_case *tc, void *data)
static void string_error(abts_case *tc, void *data)
{
char buf[128], *rv;
+ apr_status_t n;
buf[0] = '\0';
rv = apr_strerror(APR_ENOENT, buf, sizeof buf);
@@ -159,6 +160,11 @@ static void string_error(abts_case *tc, void *data)
rv = apr_strerror(APR_TIMEUP, buf, sizeof buf);
ABTS_PTR_EQUAL(tc, buf, rv);
ABTS_STR_EQUAL(tc, "The timeout specified has expired", buf);
+
+ /* throw some randomish numbers at it to check for robustness */
+ for (n = 1; n < 1000000; n *= 2) {
+ apr_strerror(n, buf, sizeof buf);
+ }
}
#define SIZE 180000