summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* dirfd: Add tests.Bruno Haible2023-05-051-0/+47
| | | | | * tests/test-dirfd.c: New file. * modules/dirfd-tests: New file.
* c32swidth: Add tests.Bruno Haible2023-05-041-0/+128
| | | | | * tests/test-c32swidth.c: New file, based on tests/test-c32width.c. * modules/c32swidth-tests: New file.
* c32width: Add tests.Bruno Haible2023-05-041-0/+102
| | | | | * tests/test-c32width.c: New file, based on tests/test-wcwidth.c. * modules/c32width-tests: New file.
* vasnprintf, vasnwprintf: Make '0' flag handling more ISO C compliant.Bruno Haible2023-05-035-68/+20
| | | | | | | | | | | | * lib/vasnprintf.c (VASNPRINTF): When doing the padding ourselves, ignore the '0' flag if a precision is specified and the conversion is one of d, i, o, u, x, X, b, B. * tests/test-vasnprintf-posix.c (test_function): Update expected results accordingly. * tests/test-vasprintf-posix.c (test_function): Likewise. * tests/test-snprintf-posix.h (test_function): Likewise. * tests/test-sprintf-posix.h (test_function): Likewise. * tests/test-vasnwprintf-posix.c (test_function): Likewise.
* limits-h: port to pccPaul Eggert2023-05-011-0/+2
| | | | | | | * doc/posix-headers/limits.texi: Document the issue. * lib/limits.in.h (MB_LEN_MAX): New macro, if not already defined. * m4/limits-h.m4 (gl_LIMITS_H): Test for MB_LEN_MAX. * tests/test-limits-h.c: Check that it’s positive.
* stdbool tests: Avoid compilation error with Sun C on Solaris 10.Bruno Haible2023-04-291-1/+1
| | | | * tests/test-stdbool.c (WORKING_BOOL): Set to 0 on Sun C.
* hamt tests: Fix test failure with Sun C on Solaris 10/SPARC.Bruno Haible2023-04-291-0/+2
| | | | * tests/test-hamt.c (main): Finish with exit code 0.
* expm1 tests: Avoid test failure on 32-bit mingw.Bruno Haible2023-04-261-5/+1
| | | | * tests/test-expm1.h (test_function): Mark y as 'volatile'.
* poll tests: Avoid test failure on native Windows.Bruno Haible2023-04-251-1/+1
| | | | | | | * tests/test-poll.c (test_pipe): Disable the POLLHUP check also on native Windows. * doc/posix-functions/poll.texi: Mention also native Windows w.r.t. POLLHUP.
* dfa tests: Fix compilation error (regression 2023-04-22).Bruno Haible2023-04-251-0/+1
| | | | | * tests/test-dfa-match-aux.c: Include unistd.h. * modules/dfa-tests (Depends-on): Add unistd.
* tests: Suppress ‘#pragma GCC diagnostic’ warnings with GCC < 13.Bruno Haible2023-04-258-10/+8
| | | | | | | | | | | * tests/test-localename.c: Disable #pragma for GCC < 12. * tests/test-dup2.c: Disable #pragma for GCC < 13. * tests/test-fcntl.c: Likewise. * tests/test-getdtablesize.c: Likewise. * tests/test-listen.c: Likewise. * tests/test-open.h: Likewise. * tests/test-perror2.c: Likewise. * tests/test-select.h: Likewise.
* unsetenv-tests: pacify -Wanalyzer-putenv-of-auto-varPaul Eggert2023-04-241-1/+2
| | | | | | * tests/test-unsetenv.c (main): Make entry static. Even with this change, it’s unclear whether this test is portable POSIX code, but that’s a different matter.
* tests: suppress some unwanted -fanalyzer checkingPaul Eggert2023-04-249-0/+47
| | | | | | | | * tests/test-dup2.c, tests/test-fcntl.c, tests/test-fopen.h: * tests/test-getdtablesize.c, tests/test-listen.c: * tests/test-localename.c, tests/test-open.h, tests/test-perror2.c: * tests/test-select.h: Add pragmas to disable unwanted -fanalyzer checking.
* unicodeio tests: Avoid test failures on native Windows.Bruno Haible2023-04-241-1/+22
| | | | | | * tests/test-unicodeio.c: Include localcharset.h. (main): Handle C locales whose encoding is CP1252 or similar. * modules/unicodeio-tests (Depends-on): Add localcharset.
* *sprintf tests: Avoid test failures on mingw 10.Bruno Haible2023-04-244-8/+16
| | | | | | | | * tests/test-vasnprintf-posix.c (test_function): On newer mingw, expect the de-facto standard result. * tests/test-vasprintf-posix.c (test_function): Likewise. * tests/test-snprintf-posix.h (test_function): Likewise. * tests/test-sprintf-posix.h (test_function): Likewise.
* string-desc tests: Avoid test failure on native Windows.Bruno Haible2023-04-222-5/+13
| | | | | | | | | * tests/test-string-desc.c: Include <fcntl.h>, <unistd.h>. (main): Expect a file name argument. Write to this file, instead of to fd 3. * tests/test-string-desc.sh: Pass a file name as argument, instead of using '3>'. * modules/string-desc-tests (Depends-on): Add close.
* posixtm tests: Avoid test failure on native Windows.Bruno Haible2023-04-221-2/+10
| | | | | * tests/test-posixtm.c (T): On native Windows, disable test cases that would fail.
* dfa tests: Fix test failure on mingw differently.Bruno Haible2023-04-222-2/+8
| | | | | | | | | Suggested by Paul Eggert. * tests/test-dfa-invalid-char-class.sh: Revert last change. * tests/test-dfa-match-aux.c: Include binary-io.h. (main): Put stdout into binary mode. * modules/dfa-tests (Depends-on): Add binary-io.
* getumask: Make it work on native Windows.Bruno Haible2023-04-201-0/+5
| | | | | | * lib/getumask.c (getumask): When TMPDIR is unset, try TMP and TEMP. * tests/test-getumask.c (ASSUME_UMASK_CONSTANT): Define to 1 on native Windows.
* readtokens tests: Fix test failure on mingw.Bruno Haible2023-04-201-3/+6
| | | | | * tests/test-readtokens.sh: Transform CRLF to LF in the output, before comparing with the expected output.
* parse-duration tests: Fix test failure on mingw.Bruno Haible2023-04-201-1/+2
| | | | | * tests/test-parse-duration.sh: Transform CRLF to LF in the output, before analyzing the output.
* dfa tests: Fix test failure on mingw.Bruno Haible2023-04-201-1/+2
| | | | | * tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the output, before comparing with the expected output.
* Move remaining call_once tests from mtx-tests to call_once-tests.Bruno Haible2023-04-203-160/+255
| | | | | | | | | | | | * tests/test-call_once1.c: Renamed from tests/test-call_once.c. * tests/test-call_once2.c: New file, based on tests/test-mtx.c. * tests/test-mtx.c: Remove the code that was testing call_once. * modules/call_once-tests (Files): Add test-call_once1.c, test-call_once2.c. Remove test-call_once.c. (Depends-on): Add thrd, lock, stdint. (configure.ac): Check for alarm. (Makefile.am): Test test-call_once1 instead of test-call_once. Also test test-call_once2.
* execute tests: Fix compilation error on mingw (regression 2023-01-17).Bruno Haible2023-04-201-0/+2
| | | | | * tests/test-execute-main.c (main): Don't use SIGPIPE if it's not defined.
* chown, lchown tests: Fix link error on mingw 10.Bruno Haible2023-04-201-0/+4
| | | | | | | | * modules/chown-tests (configure.ac): Test whether getgid() exists. * modules/lchown-tests (configure.ac): Likewise. * modules/fchownat-tests (configure.ac): Likewise. * tests/test-chown.h (getgid): Define a fallback. * tests/test-lchown.h (getgid): Likewise.
* chown tests: Fix link error on mingw 10.Bruno Haible2023-04-201-0/+4
| | | | | | * modules/chown-tests (configure.ac): Test whether getgid() exists. * modules/fchownat-tests (configure.ac): Likewise. * tests/test-chown.h (getgid): Define a fallback.
* wcsncmp: Add tests.Bruno Haible2023-04-191-0/+182
| | | | | | * tests/test-wcsncmp.c: New file, based on tests/unistr/test-strncmp.h and tests/test-wcscmp.c. * modules/wcsncmp-tests: New file.
* wcscmp: Add tests.Bruno Haible2023-04-191-0/+122
| | | | | * tests/test-wcscmp.c: New file, based on tests/unistr/test-strcmp.h. * modules/wcscmp-tests: New file.
* wmemcmp: Add tests.Bruno Haible2023-04-191-1/+5
| | | | * tests/test-wmemcmp.c (main): Add comment.
* wmemcmp: Add tests.Bruno Haible2023-04-191-0/+91
| | | | | * tests/test-wmemcmp.c: New file, based on tests/unistr/test-cmp.h. * modules/wmemcmp-tests: New file.
* Go back to dynamic largefile, year2038 testsPaul Eggert2023-04-182-12/+22
| | | | | | | | | Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2023-04/msg00134.html * modules/largefile-tests, modules/year2038-tests (Depends-on): Remove assert-h. * tests/test-largefile.c, tests/test-year2038.c: Test dynamically, not via static_assert.
* file-has-acl tests: Avoid test failures on Cygwin 3.4.6.Bruno Haible2023-04-181-1/+1
| | | | | * tests/test-file-has-acl.sh: Fix distinction between Linux setfacl and Cygwin setfacl.
* c32isgraph: Avoid test failure on Cygwin 3.4.6.Bruno Haible2023-04-181-2/+2
| | | | * tests/test-c32isgraph.c (main): Skip U+00A0 test on Cygwin.
* Slightly nicer largefile, year2038 testsPaul Eggert2023-04-172-21/+15
| | | | | | | | * modules/largefile-tests, modules/year2038-tests (Depends-on): Add assert-h, intprops. * tests/test-largefile.c, tests/test-year2038.c: Prefer compile-time to run-time tests. Don’t assume CHAR_BIT == 8.
* year2038: Add tests.Bruno Haible2023-04-161-0/+39
| | | | | * tests/test-year2038.c: New file. * modules/year2038-tests: New file.
* largefile: Add tests.Bruno Haible2023-04-161-0/+47
| | | | | * tests/test-largefile.c: New file. * modules/largefile-tests: New file.
* posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin.Bruno Haible2023-04-161-2/+2
| | | | | * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an unportable test also on Cygwin.
* Fix some "make sc_prohibit_leading_TABs" findings.Bruno Haible2023-04-112-19/+19
| | | | | * tests/test-calloc-gnu.c: Expand tabs. * tests/test-regex.c: Likewise.
* c32toupper: Add tests.Bruno Haible2023-04-102-0/+490
| | | | | | * tests/test-c32toupper.sh: New file. * tests/test-c32toupper.c: New file, based on tests/test-c32islower.c. * modules/c32toupper-tests: New file.
* c32tolower: Add tests.Bruno Haible2023-04-102-0/+478
| | | | | | * tests/test-c32tolower.sh: New file. * tests/test-c32tolower.c: New file, based on tests/test-c32isupper.c. * modules/c32tolower-tests: New file.
* striconveh tests: Avoid test failure on glibc 2.15.Bruno Haible2023-04-081-6/+12
| | | | | * tests/test-striconveh.c (main): Skip some of the GB18030 tests on glibc < 2.16.
* vasnwprintf-posix tests: Avoid test failure on mingw.Bruno Haible2023-04-071-2/+2
| | | | | * tests/test-vasnwprintf-posix.c (test_function): For mingw, change two expected test results.
* string-desc-quotearg tests: Avoid a test failure on Haiku.Bruno Haible2023-04-061-2/+6
| | | | | | * tests/test-string-desc-quotearg.c (main): For the clocale_quoting_style, accept also the U+2018 and U+2019 characters in UTF-8 encoding.
* strerrorname_np: Fix compilation error on Haiku.Bruno Haible2023-04-051-1/+1
| | | | | | * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between EDOOFUS and EINVAL. * tests/test-strerrorname_np.c (main): Likewise.
* localename tests: Work around a Haiku bug.Bruno Haible2023-04-051-0/+5
| | | | * tests/test-localename.c (freelocale): New macro.
* uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.Bruno Haible2023-04-041-4/+4
| | | | | | | | | | | | | * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T. * lib/mbrtoc32.c: Update. * lib/mbsrtoc32s.c: Update. * lib/mbsnrtoc32s.c: Update. * lib/c32tob.c: Update. * lib/c32rtomb.c: Update. * lib/c32srtombs.c: Update. * lib/c32snrtombs.c: Update. * lib/c32is-impl.h: Update. * tests/test-uchar.c: Update.
* tests: Set executable bit on more tests.Bruno Haible2023-04-034-0/+0
| | | | | | | * tests/test-c-dtoastr.sh: Make executable. * tests/test-c-ldtoastr.sh: Likewise. * tests/test-immutable.sh: Likewise. * tests/test-vasnwprintf-posix2.sh: Likewise.
* fix harmless ChangeLog typoJim Meyering2023-04-031-0/+0
|
* tests: set executable bit in test-trim[1-3].shJim Meyering2023-04-032-0/+0
| | | | | | | This avoids a test failure for each new file. * tests/test-trim1.sh: Make this file executable. * tests/test-trim2.sh: Likewise. * tests/test-trim1.sh: Likewise.
* mbstoc32s tests: Check behaviour in the C locale.Bruno Haible2023-04-032-0/+75
| | | | | | | | | * tests/test-mbstoc32s.c (main): Test behaviour in the C locale. Based on tests/test-mbstowcs.c. * tests/test-mbstoc32s-5.sh: New file, based on tests/test-mbstowcs5.sh. * modules/mbstoc32s-tests (Files): Add it. (Depends-on): Add btoc32. (Makefile.am): Run test-mbstoc32s-5.sh.