From: Bruno Haible Date: Wed, 15 Oct 2025 13:01:55 +0000 (+0200) Subject: glob tests: Improve maintainability. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00f989aa6da0ddf224c1c7b3826e9fc059a0910d;p=thirdparty%2Fgnulib.git glob tests: Improve maintainability. * tests/test-glob.c (main): Make the second added test independent from the first one. --- diff --git a/ChangeLog b/ChangeLog index c8af7641b2..56efbc3820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-10-15 Bruno Haible + + glob tests: Improve maintainability. + * tests/test-glob.c (main): Make the second added test independent from + the first one. + 2025-10-14 Collin Funk getdelim: Avoid the symbol __getdelim with ASAN (regr. 2025-10-13). diff --git a/tests/test-glob.c b/tests/test-glob.c index 140a2b10f5..7b3439b6cd 100644 --- a/tests/test-glob.c +++ b/tests/test-glob.c @@ -110,12 +110,13 @@ main () globfree (&g); /* "/*/////sh". */ + memset (pattern, '/', 9997); pattern[1] = '*'; - pattern[9997] = 's'; - pattern[9998] = 'h'; + strcpy (pattern + 9997, "sh"); res = glob (pattern, 0, NULL, &g); ASSERT (res == 0); globfree (&g); + free (pattern); }