tests


Log

Author Commit Date CI Message
Bruno Haible f58214d6 2008-03-10T02:01:23 Take into account the number of pushed-back bytes (ungetc).
Bruno Haible 03400ebf 2008-03-10T00:23:20 Extend freadptr to return also the buffer size.
Bruno Haible 679b14d8 2008-03-07T03:34:46 Make fflush after ungetc work on BSD platforms.
Simon Josefsson b4feec41 2008-03-06T12:01:44 Rename __func__ module to func. Suggested by Eric Blake <ebb9@byu.net>.
Simon Josefsson e2b0fa9e 2008-03-06T11:16:06 Minor cleanups of __func__ module, suggested by Eric Blake <ebb9@byu.net>.
Simon Josefsson 5e4c2e5a 2008-03-04T15:37:59 Add module __func__ to provide C99 __func__ variable.
Jim Meyering 7dd49d28 2008-02-18T14:12:07 Remove useless "if" tests before free. Deprecate "free" module. * doc/posix-functions/free.texi: Mention that this module is no longer useful. * modules/free (Notice): Say this module is obsolete. * modules/readutmp (Depends-on): Remove free. * lib/save-cwd.c (free_cwd): Remove useless "if" before free. * lib/putenv.c (putenv): Likewise. * lib/gc-gnulib.c (gc_cipher_close): Likewise. * lib/getaddrinfo.c (freeaddrinfo): Likewise. * tests/test-c-strcasestr.c (main): Likewise. * tests/test-c-strstr.c (main): Likewise. * tests/test-mbscasestr1.c (main): Likewise. * tests/test-mbscasestr2.c (main): Likewise. * tests/test-mbsstr1.c (main): Likewise. * tests/test-mbsstr2.c (main): Likewise. * tests/test-memmem.c (main): Likewise. * tests/test-strcasestr.c (main): Likewise. * tests/test-striconv.c (main): Likewise. * tests/test-striconveh.c (main): Likewise. * tests/test-striconveha.c (main): Likewise. * tests/test-strstr.c (main): Likewise.
Eric Blake 03e82390 2008-03-01T08:40:22 Fix bugs in last patch. * lib/memchr2.c (memchr2): Fix typo. * tests/test-memchr2.c: Test previous bug, and don't use GNU extension. Reported by Bruce Korb. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake f91b9f97 2008-03-01T06:54:29 New module 'memchr2'. * modules/memchr2: New file. * modules/memchr2-tests: Likewise. * lib/memchr2.h: Likewise. * lib/memchr2.c: Likewise, based on memchr.c. * tests/test-memchr2.c: New test. * MODULES.html.sh (String handling): Add memchr2. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible ba35bf7e 2008-02-29T10:31:01 Tests for module 'freadseek'.
Bruno Haible 5a79e1d1 2008-02-29T01:08:18 More tests for freadptr.
Bruno Haible 4bf3a252 2008-02-28T13:21:06 Tests for module 'freadptr'.
Bruno Haible 6e99bc97 2008-02-24T16:58:50 Tests for module 'environ'.
Eric Blake 3d986f52 2008-02-16T07:40:47 Avoid doubling \ in common case of "c-maybe" quoting style. * lib/quotearg.c (quotearg_buffer_restyled): Don't escape \ when eliding outer quotes. * lib/quotearg.h: Document this. * tests/test-quotearg.c (result_strings, inputs, results_g) (flag_results, locale_results): Test it by adding a new string to each test group. (compare_strings): Test new string. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake df4e570b 2008-02-13T21:46:03 Avoid trigraph quoting in default output. * lib/quotearg.h (enum quoting_flags): Add QA_SPLIT_TRIGRAPHS. * lib/quotearg.c (quotearg_buffer_restyled): Don't quote trigraphs unless explicitly requested. * tests/test-quotearg.c (flag_results, main): Add additional tests. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake d1ae289c 2008-02-13T07:41:22 Avoid shadowing warning and compile errors on Linux. * tests/test-quotearg.c [ENABLE_NLS]: Disable <libintl.h> forwarding macros on Linux. (dcgettext): Define a stub, for Linux. (results_g, main): Avoid warnings. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 05230b80 2008-02-12T11:42:29 Quotearg part 4: add tests, fix c-maybe colon quoting. * lib/quotearg.h: Improve documentation. * lib/quotearg.c (quotearg_buffer_restyled): Don't add extra escapes when adding outer quotes. When quoting trigraphs, use valid C notation. When quoting NUL, omit extra characters if next character is not digit. Alter prototype. (quotearg_buffer, quotearg_alloc_mem, quotearg_n_options): Adjust callers. * modules/quotearg-tests: New module. * tests/test-quotearg.c: New test. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 6cad9c91 2008-02-07T02:08:13 Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Simon Josefsson e50ec111 2008-01-31T13:59:03 Add sha1 self test.
Bruno Haible b17d7ac7 2008-01-26T15:17:58 Rename isnan, applicable to 'double' only, to isnand.
Jim Meyering f026d2bb 2008-01-25T21:52:02 Prefer <config.h> over "config.h". See autoconf doc for explanation. * lib/poll.c: Include <config.h>, not "config.h". * tests/test-getaddrinfo.c: Likewise.
Simon Josefsson bb2bf54f 2008-01-24T15:55:56 Add module sockets.
Bruno Haible 68751d7e 2008-01-18T02:14:04 Fix a printf statement.
Simon Josefsson 3765bb11 2008-01-17T13:16:12 New module gethostname-tests.
Eric Blake 174af8a7 2008-01-16T20:35:00 Convert c-strcasestr to be more efficient. * modules/c-strcasestr (Files): Use Two-Way, not KMP. (Depends-on): Add c-strcase, remove malloca, strnlen. * tests/test-c-strcasestr.c (main): Enhance test. * lib/c-strcasestr.c (c_strcasestr): Rewrite to new algorithm. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 9c063a2a 2008-01-10T22:22:51 Convert strcasestr module to use Two-Way algorithm. * modules/strcasestr-simple: New module, based on the old strcasestr, but with Two-Way rather than KMP. * modules/strcasestr (Depends-on): Change to strcasestr-simple. * lib/string.in.h (rpl_strcasestr): Declare. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Check for linear performance. * lib/strcasestr.c (strcasestr): Simplify, and avoid malloc. * modules/string (Makefile.am): Support strcasestr. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise. * modules/strcasestr-tests (Depends-on): Check for alarm. * tests/test-strcasestr.c: Augment test. * lib/str-two-way.h: Clean up stray macro. * NEWS: Document new module. * MODULES.html.sh (string handling): Likewise. * doc/functions/strcasestr.texi: New file. * doc/gnulib.texi (Function Substitutes): New node. Move memmem here, since it is not a POSIX function. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible f9462738 2008-01-15T02:25:14 Replace strsignal if it does not work fine.
Colin Watson ec1d2ed4 2008-01-14T00:27:28 Tests for module 'strsignal'.
Bruno Haible 4cc1c913 2008-01-12T01:14:37 Increase the maximum allowed time for the test.
Eric Blake 96facb24 2008-01-10T07:38:11 Avoid quadratic strstr implementations. * lib/strstr.c: New file. * m4/strstr.m4: Likewise. * modules/strstr: Likewise. * modules/strstr-tests: Likewise. * tests/test-strstr.c: Likewise. * lib/string.in.h (rpl_strstr): Declare. (memmem) [GNULIB_POSIXCHECK]: Document speed issue. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Support strstr. * modules/string (Makefile.am): Likewise. * MODULES.html.sh (string handling): Mention new module. * doc/functions/strstr.texi (strstr): Document the bug. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 2bb843df 2008-01-10T02:36:58 Fix test failure on OpenBSD 4.0.
Eric Blake 9d8d6cd7 2008-01-05T14:09:11 Rewrite memmem to guarantee linear complexity without malloc. * lib/memmem.c (memmem): Use Two-Way rather than Knuth-Morris-Pratt, to allow O(1) space usage. (critical_factorization, two_way_short_needle) (two_way_long_needle): New functions. (knuth_morris_pratt): Delete. * modules/memmem (Depends-on): No longer need malloca or stdbool. Add stdint. * tests/test-memmem.c (main): Add tests for periodic needle and sublinear performance. * doc/functions/memmem.texi (memmem): Document other deficiencies in cygwin and older glibc. Signed-off-by: Eric Blake <ebb9@byu.net>
Simon Josefsson 5ea111c5 2008-01-08T09:09:18 Update localename-tests for setenv changes.
Bruno Haible aa9089a1 2008-01-07T23:29:52 Relax test, so that it passes on older glibc systems.
Eric Blake b25c432e 2008-01-05T04:47:05 Fix memmem test for mingw. * modules/memmem-tests (configure.ac): Check for alarm. * tests/test-memmem.c (main): Avoid alarm on platforms that lack it. * doc/functions/memmem.texi: New file. * doc/gnulib.texi (Function Substitutes): Add memmem. Reported by Bruno Haible. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 64181a34 2008-01-04T15:19:34 Shorten duration of memmem test. * tests/test-memmem.c (main): Use alarm to declare failure if test is taking too long. Reported by Ralf Wildenhues. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 6cb0a370 2007-12-26T16:02:46 Use standard idioms.
Eric Blake fc068cf4 2007-12-19T16:09:03 Fix memmem to avoid O(n^2) worst-case complexity. * lib/memmem.c (knuth_morris_pratt): New function. (memmem): Use it if first few naive iterations fail. * m4/memmem.m4 (gl_FUNC_MEMMEM): Detect cygwin bug. * modules/memcmp (License): Set to LGPLv2+, not LGPL. * modules/memchr (License): Likewise. * modules/memmem (Depends-on): Add memcmp, memchr, stdbool, and malloca. * tests/test-memmem.c: Rewrite, borrowing ideas from test-mbsstr1.c; the old version wouldn't even compile! * modules/memmem-tests: New file. * lib/string.in.h (rpl_memmem): Add declaration. * modules/string (Makefile.am): Substitute REPLACE_MEMMEM. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Default for REPLACE_MEMMEM. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 661445a1 2007-12-13T14:58:44 Another fseek test. * tests/test-fseek.c (main): Also test ungetc handling. * tests/test-fseeko.c (main): Likewise. * modules/fseeko (Depends-on): Add verify. * lib/fseeko.c [!HAVE_FSEEKO]: Verify that off_t is not too large. Reported by Larry Jones. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 588adf30 2007-12-13T11:25:42 Beef up fseek tests. * tests/test-fseek.c (main): Also test eof handling. * tests/test-fseeko.c (main): Likewise. Reported by Larry Jones. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 6e2c5ce9 2007-12-11T14:00:26 Fix bug with -0.0L in previous patch. * lib/isnan.c (rpl_isnanl): Make robust to -0.0L and pad bits. * tests/test-isnan.c (main): Also test on zeroes. * tests/test-isnanf.c (main): Likewise. * tests/test-isnanl.h (main): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible f894506e 2007-12-03T12:53:14 Tests for module 'strings'.
Paul Eggert d5e6f00f 2007-11-16T13:16:27 Port test-getaddrinfo to Solaris (fixed version; previous change was wrong).
Paul Eggert f2baeec9 2007-11-16T11:18:36 Port test-getaddrinfo to Solaris. Problem reported by Bruno Haible in <http://lists.gnu.org/archive/html/bug-gnulib/2007-03/msg00171.html>. * tests/test-getaddrinfo.c (simple): Add a comment asking for an explanation of setting 'hints'. (SERV1, SERV2, SERV3): Don't use "http" and "https"; this doesn't work in Solaris 10 and earlier.
Jim Meyering 9793b3ec 2007-11-14T13:33:21 Define a sometimes-link-required function using ARGMATCH_DIE_DECL. * tests/test-argmatch.c (ARGMATCH_DIE_DECL): When defined, use this macro to create a function _definition_. Remove useless "#undef ARGMATCH_DIE".
Bruno Haible a635ca9c 2007-11-13T00:25:37 Tests for Unicode character classification functions.
Bruno Haible 5c20ddee 2007-11-11T14:26:28 A better way to avoid link failure for the argmatch test.
Jim Meyering 67ffa466 2007-11-10T16:31:31 Avoid link failure for the argmatch test. * tests/test-argmatch.c (usage): Define function to avoid a link failure: argmatch_die requires a usage function.
Bruno Haible fe5143cd 2007-11-04T19:43:13 Add tests for large precisions.
Bruno Haible 7926b0fc 2007-11-03T17:00:19 New tests for modules 'test-fprintf-posix' and 'test-printf-posix'.
Bruno Haible 9b769afc 2007-10-31T02:30:29 Typo in comment.
Bruno Haible 8c5e6f23 2007-10-31T02:25:22 Tests for module 'xprintf-posix'.
Ben Pfaff e74e1f15 2007-10-27T22:12:07 Implement 'isfinite' module.
Ralf Wildenhues f5657ed3 2007-10-22T22:44:20 * tests/test-i-ring.c: Work for C89.
Eric Blake 356aef65 2007-10-22T09:39:27 * tests/test-yesno.sh: Silence stderr during test. Signed-off-by: Eric Blake <ebb9@byu.net>
Ben Pfaff 7094a1e0 2007-10-21T17:28:32 Fix bugs in round modules reported by Bruno Haible.
Bruno Haible 5332d5a4 2007-10-22T01:35:10 Allow wcwidth to return -1 in some more cases. Fixes test failure on Solaris 10.
Bruno Haible 075d2812 2007-10-21T21:37:48 Allow wcwidth to return -1 in some cases.
Bruno Haible 386f7ca4 2007-10-21T20:06:53 Use isnanf() instead of isnan(). Avoids a link error on HP-UX 11.
Ben Pfaff 980d2709 2007-10-20T13:08:26 Implement 'round', 'roundf', 'roundl' modules.
Bruno Haible c532b2a8 2007-10-20T14:34:54 Don't rely on excess precision: -4 > -3.00000024 - 1 can evaluate to false if the CPU rounds correctly to nearest.
Bruno Haible f3e57782 2007-10-14T12:29:27 Test for module 'iconv_open-utf'.
Bruno Haible c7f33ef7 2007-10-13T03:09:19 Fix incorrect rounding of ceil, ceilf, ceill in some cases. Add new test.
Bruno Haible fcb8ef08 2007-10-13T03:00:51 Rename tests/test-ceilf.c to tests/test-ceilf1.c.
Bruno Haible 216ec371 2007-10-13T02:52:28 New test.
Bruno Haible 7a937650 2007-10-13T02:28:32 Rename tests/test-floorf.c to tests/test-floorf1.c.
Bruno Haible ac328d5c 2007-10-13T02:14:52 Add new test for trunc function.
Bruno Haible 7937a9a7 2007-10-13T02:07:12 Rename tests/test-trunc.c to tests/test-trunc1.c.
Bruno Haible 3db9b0d8 2007-10-13T02:03:49 Fix incorrect rounding of trunc, truncf, truncl in some cases. Add a new test.
Bruno Haible 2a75299e 2007-10-13T02:00:48 Renamed to tests/test-truncf1.c.
Bruno Haible 0a8c9954 2007-10-13T01:52:20 Rename test-truncf.c to test-truncf1.c.
Bruno Haible 3b955660 2007-10-11T23:56:06 Put unit test for i-ring module into a normal test module.
Bruno Haible 8cf0c73a 2007-10-11T23:44:32 Put unit test for filenamecat module into a normal test module.
Eric Blake c116e750 2007-10-09T08:09:48 Silence test-fpending. * modules/fpending-tests (Files): Add wrapper script. * tests/test-fpending.sh: New file. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 57fdfd3f 2007-10-07T19:14:58 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible b42d5010 2007-10-07T17:38:16 Change copyright notice from LGPLv2.1+ to LGPLv3+.
Bruno Haible 36bde9b7 2007-10-07T04:48:29 Test for module 'freopen'.
Bruno Haible 5b86035a 2007-10-07T04:47:49 Test for module 'fopen'.
Bruno Haible 77676a2d 2007-10-07T04:40:31 Test for 'open' module.
Bruno Haible 3868cf78 2007-10-05T03:55:37 Test for module 'ceill'.
Bruno Haible 9ae286b3 2007-10-05T03:44:19 Test for module 'ceilf'.
Bruno Haible 3b63293b 2007-10-05T03:34:16 Test for module 'floorl'.
Bruno Haible 8e4a7458 2007-10-05T03:02:59 Test for module 'floorf'.
Bruno Haible 66e25598 2007-10-05T01:41:26 Test for module 'truncl'.
Bruno Haible 629f74ae 2007-10-05T01:08:22 Test for module 'truncf'.
Bruno Haible 0909fcfe 2007-10-04T03:23:10 Test for module 'trunc'.
Bruno Haible 606dd130 2007-10-03T23:36:11 Test for __fpending function.
Bruno Haible 0f0eb9bc 2007-09-30T15:54:30 Make the test compile on BeOS.
Bruno Haible 27de795d 2007-09-30T01:06:17 Remove execute permission.
Eric Blake 49adfaf5 2007-09-28T06:33:50 Fix test-closein on Solaris 10. * tests/test-closein.c (main): Don't assume stdin can be inherited closed on all systems. * tests/test-closein.sh: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering cbbc0892 2007-09-24T13:39:37 canonicalize: Avoid a false-positive cycle failure. * modules/canonicalize (Depends-on): Add file-set and hash-triple. Sort. Remove cycle-check. * lib/canonicalize.c: Include file-set.h and hash-triple.h, not cycle-check.h. (seen_triple): New function. (canonicalize_filename_mode): Use it instead of cycle-check. * tests/test-canonicalize.c: Add a test for this bug. * tests/test-canonicalize.sh: Set up and run the test.
Eric Blake d5d3e86d 2007-09-25T10:40:16 Fix strerror on Interix. * lib/string_.h (strerror): Declare replacement. * doc/functions/strerror.texi (strerror): Document the Interix shortcoming. * modules/string (Makefile.am): Support new hooks. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks. * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to gl_FUNC_STRERROR_SEPARATE. (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug. * lib/strerror.c (rpl_strerror): Provide replacement. * modules/strerror (Depends-on): Add string. (configure.ac): Detect use of module. * tests/test-strerror.c: New file. * modules/strerror-tests: New test module. * modules/argp (Depends-on): Add strerror. * modules/error (Depends-on): Likewise. Reported by Martin Koeppe. Signed-off-by: Eric Blake <ebb9@byu.net>
Simon Josefsson 0ba954b5 2007-09-21T15:02:37 tests/test-canonicalize.sh: Turn on executable bit.
Eric Blake cef82862 2007-08-22T14:04:30 * tests/test-getdelim.c (main): Use remove, not unlink. * tests/test-getline.c (main): Likewise.
Eric Blake d68417c0 2007-08-22T12:54:21 Move getline and getdelim into stdio.h, per POSIX 200x. * modules/getline (Files): Remove getline.h. (Depends-on): Add stdio. (configure.ac): Add module indicator. * modules/getdelim (Files): Remove getdelim.h. (Depends-on): Add stdio. (configure.ac): Add module indicator. * modules/stdio (Makefile.am): Work with new indicators. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * lib/getdelim.h: Delete. * lib/getline.h: Delete. * lib/stdio_.h (getdelim, getline): Declare. * modules/getdelim-tests: New module. * modules/getline-tests: Likewise. * tests/test-getdelim.c: New file. * tests/test-getline.c: Likewise. * NEWS: Document the change. * lib/getline.c: Update choice of header. * lib/csharpcomp.c: Likewise. * lib/getpass.c: Likewise. * lib/javacomp.c: Likewise. * lib/javaversion.c: Likewise. * lib/yesno.c: Likewise. * lib/getdelim.c: Likewise. (getdelim): Set errno on failure, and avoid memory leak.
Bruno Haible 5bca97ae 2007-08-19T17:43:56 Tests for module 'freadahead'.
Eric Blake 1cf55d29 2007-08-19T15:47:14 Test yesno in combination with closein. * lib/yesno.c (yesno): Document use of stdin. * modules/yesno-tests (Files): New module. * tests/test-yesno.c (main): New file. * tests/test-yesno.sh: Likewise.
Bruno Haible 757e397c 2007-08-19T09:10:56 Another lseek bug on BeOS.
Bruno Haible a669764b 2007-08-18T17:09:47 Test of fuzzy string matching.
Paul Eggert 50236f7a 2007-08-10T19:07:06 * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise. * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.