summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* error, strerror-override: Support new errno values from POSIX:2008.Bruno Haible2012-06-031-0/+2
| | | | | | | | | | | | | | | * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and ENOTRECOVERABLE. * lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all platforms. * lib/strerror-override.c (strerror_override): Conditionalize the EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD. * lib/strerror-override.h (strerror_override): Declare also if GNULIB_defined_EOWNERDEAD is defined. * tests/test-errno.c (e130, e131): New variables. * doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD, ENOTRECOVERABLE. Reported by Paolo Bonzini.
* system-quote-tests: port to CentOS 5Paul Eggert2012-05-291-0/+5
| | | | | | Problem reported by Tom G. Christensen in <http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00255.html>. * tests/test-system-quote-child.c (fclose, fprintf): Undef.
* binary-io: Define set_binary_mode function.Bruno Haible2012-05-132-9/+25
| | | | | | | | | | * lib/binary-io.h (set_binary_mode): New function. (SET_BINARY): Define in terms of set_binary_mode. * modules/binary-io (configure.ac): Require AC_C_INLINE. * tests/test-binary-io.c (main): Accept an argument, and test either set_binary_mode or SET_BINARY depending on the argument. * tests/test-binary-io.sh: Invoke test-binary-io twice, with an argument. Clean up also t-bin-out0.tmp.
* system-quote, execute, spawn-pipe: Escape '?' on Windows.Bruno Haible2012-05-111-0/+9
| | | | | | | | | * lib/system-quote.c (SHELL_SPECIAL_CHARS, CMD_SPECIAL_CHARS): Add the '?' character. * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Likewise. * tests/test-system-quote-main.c (check_all): Check also strings like "??????????". Reported by Eli Zaretskii <eliz@gnu.org>.
* Tests for module 'system-quote'.Bruno Haible2012-05-093-0/+406
| | | | | | | * modules/system-quote-tests: New file. * tests/test-system-quote.sh: New file. * tests/test-system-quote-main.c: New file. * tests/test-system-quote-child.c: New file.
* sh-quote tests: Make tests stricter.Bruno Haible2012-05-091-1/+3
| | | | | | | * tests/test-sh-quote.c (check_one): Check the return value of shell_quote_copy. (main): Check a string with a CR character. Check a string that contains UCHAR_MAX.
* init.sh: explain why $EXEEXT support uses aliases rather than functionsJim Meyering2012-05-081-0/+5
| | | | * tests/init.sh: Add a comment.
* init.sh: don't let bash aliases interfere with testsJim Meyering2012-05-081-0/+3
| | | | | | | * tests/init.sh: Undefine any pre-defined aliases if the selected shell is bash. This avoids problems for those who alias standard commands to non-conforming uses, like those reported in http://bugs.gnu.org/11256. Suggested by Tim Mooney <Tim.Mooney@ndsu.edu>.
* Tests for module 'sh-quote'.Bruno Haible2012-05-071-0/+201
| | | | | * modules/sh-quote-tests: New file. * tests/test-sh-quote.c: New file.
* exclude: process exclude and include directives in orderPaul Eggert2012-04-291-1/+1
| | | | | | | | | | | | | | | | | | | This restores the pre-2009 behavior, and is part of a fix of a grep bug reported by Quentin Arce in <http://lists.gnu.org/archive/html/bug-grep/2012-04/msg00056.html>. * lib/exclude.c (struct exclude): Remove 'tail' member. (new_exclude_segment): Prepend the new segment instead of appending. Return void, since that's now more convenient. (file_pattern_matches): Renamed from excluded_file_pattern_p. (file_name_matches): Renamed from excluded_file_name_p. (file_pattern_matches, file_name_matches): Return true if the pattern matches, not if it excludes. All callers changed. (excluded_file_name): Process the list in reverse order; since the list is now reversed this restores the pre-2009 behavior. (add_exclude): Adjust to new reversed-order list. Use local var rather than macro, for clarity. * tests/test-exclude7.sh: Adjust to corrected behavior.
* rint* tests: Avoid gcc warnings.Bruno Haible2012-04-223-0/+9
| | | | | | * tests/test-rint.c (INFINITY, NAN): Undefine before redefining. * tests/test-rintf.c (INFINITY, NAN): Likewise. * tests/test-rintl.c (INFINITY, NAN): Likewise.
* Tests for module 'getrusage'.Bruno Haible2012-04-131-0/+86
| | | | | * modules/getrusage-tests: New file. * tests/test-getrusage.c: New file.
* Tests for module 'sys_resource'.Bruno Haible2012-04-131-0/+72
| | | | | * modules/sys_resource-tests: New file. * tests/test-sys_resource.c: New file.
* Tests for module 'ilogbl'.Bruno Haible2012-04-031-0/+67
| | | | | * modules/ilogbl-tests: New file. * tests/test-ilogbl.c: New file.
* New module 'ilogbl'.Bruno Haible2012-04-031-0/+3
| | | | | | | | | | | | | | * lib/math.in.h (ilogbl): New declaration. * lib/ilogbl.c: New file. * m4/ilogbl.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether ilogbl is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBL, HAVE_ILOGBL. * modules/math (Makefile.am): Substitute GNULIB_ILOGBL, HAVE_ILOGBL. Split sed invocation, to avoid the limit of 100 substitutions of HP-UX 'sed'. * modules/ilogbl: New file. * tests/test-math-c++.cc: Check the declaration of ilogbl. * doc/posix-functions/ilogbl.texi: Mention the new module.
* Tests for module 'ilogbf'.Bruno Haible2012-04-031-0/+56
| | | | | * modules/ilogbf-tests: New file. * tests/test-ilogbf.c: New file.
* New module 'ilogbf'.Bruno Haible2012-04-031-0/+3
| | | | | | | | | | | | | | * lib/math.in.h (ilogbf): New declaration. * lib/ilogbf.c: New file. * m4/ilogbf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether ilogbf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGBF, HAVE_ILOGBF, REPLACE_ILOGBF. * modules/math (Makefile.am): Substitute GNULIB_ILOGBF, HAVE_ILOGBF, REPLACE_ILOGBF. * modules/ilogbf: New file. * tests/test-math-c++.cc: Check the declaration of ilogbf. * doc/posix-functions/ilogbf.texi: Mention the new module.
* Tests for module 'ilogb'.Bruno Haible2012-04-032-0/+212
| | | | | | | * modules/ilogb-tests: New file. * tests/test-ilogb.c: New file. * tests/test-ilogb.h: New file, based on tests/test-logb.h and tests/test-logb-ieee.h.
* New module 'ilogb'.Bruno Haible2012-04-031-0/+4
| | | | | | | | | | | | | | * lib/math.in.h (ilogb): New declaration. * lib/ilogb.c: New file. * m4/ilogb.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether ilogb is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_ILOGB, HAVE_ILOGB, REPLACE_ILOGB. * modules/math (Makefile.am): Substitute GNULIB_ILOGB, HAVE_ILOGB, REPLACE_ILOGB. * modules/ilogb: New file. * tests/test-math-c++.cc: Check the declaration of ilogb. * doc/posix-functions/ilogb.texi: Mention the new module.
* math: Provide FP_ILOGB0 and FP_ILOGBNAN.Bruno Haible2012-04-031-0/+18
| | | | | | | | * lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback. * tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined. (main): Check their values. * doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN problem.
* Tests for module 'logbl-ieee'.Bruno Haible2012-04-031-0/+45
| | | | | * modules/logbl-ieee-tests: New file. * tests/test-logbl-ieee.c: New file.
* Tests for module 'logb-ieee'.Bruno Haible2012-04-031-0/+45
| | | | | * modules/logb-ieee-tests: New file. * tests/test-logb-ieee.c: New file.
* Tests for module 'logbf-ieee'.Bruno Haible2012-04-032-0/+73
| | | | | | * modules/logbf-ieee-tests: New file. * tests/test-logbf-ieee.c: New file. * tests/test-logb-ieee.h: New file.
* Tests for module 'logbl'.Bruno Haible2012-04-031-0/+60
| | | | | * modules/logbl-tests: New file. * tests/test-logbl.c: New file.
* New module 'logbl'.Bruno Haible2012-04-031-0/+3
| | | | | | | | | | | | | | * lib/math.in.h (logbl): New declaration. * lib/logbl.c: New file. * m4/logbl.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether logbl is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBL, HAVE_LOGBL, REPLACE_LOGBL. * modules/math (Makefile.am): Substitute GNULIB_LOGBL, HAVE_LOGBL, REPLACE_LOGBL. * modules/logbl: New file. * tests/test-math-c++.cc: Check the declaration of logbl. * doc/posix-functions/logbl.texi: Mention the new module.
* Tests for module 'logbf'.Bruno Haible2012-04-031-0/+49
| | | | | * modules/logbf-tests: New file. * tests/test-logbf.c: New file.
* New module 'logbf'.Bruno Haible2012-04-031-0/+3
| | | | | | | | | | | | | | * lib/math.in.h (logbf): New declaration. * lib/logbf.c: New file. * m4/logbf.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether logbf is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGBF, HAVE_LOGBF, REPLACE_LOGBF. * modules/math (Makefile.am): Substitute GNULIB_LOGBF, HAVE_LOGBF, REPLACE_LOGBF. * modules/logbf: New file. * tests/test-math-c++.cc: Check the declaration of logbf. * doc/posix-functions/logbf.texi: Mention the new module.
* logb tests: More tests.Bruno Haible2012-04-032-26/+163
| | | | | | | | | | * tests/test-logb.h: New file, based on tests/test-logb.c and tests/test-frexp.h. * tests/test-logb.c: Include minus-zero.h, test-logb.h. (main): Just invoke test_function. * modules/logb-tests (Files): Add tests/test-logb.h, tests/minus-zero.h, tests/randomd.c. (Makefile.am): Add randomd.c to test_logb_SOURCES.
* logb: Provide replacement and workarounds.Bruno Haible2012-04-031-2/+4
| | | | | | | | | | | | | | | | * lib/math.in.h (logb): Ensure declaration. Replace if REPLACE_LOGB is 1. * lib/logb.c: New file. * m4/logb.m4 (gl_FUNC_LOGB_WORKS): New macro. (gl_FUNC_LOGB): Invoke it. Set HAVE_LOGB, REPLACE_LOGB. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_LOGB. * modules/math (Makefile.am): Substitute REPLACE_LOGB. * modules/logb (Files): Add lib/logb.c. (Depends-on): Add isfinite, frexp, isnand. (configure.ac): Compile the replacement code logb.c if needed. * tests/test-math-c++.cc: Check the declaration of logb. * doc/posix-functions/logb.texi: Mention the replacement and the bug with subnormal numbers.
* log10* tests: Speed up.Bruno Haible2012-04-031-2/+2
| | | | | * tests/test-log10.h (test_function): Reduce amount of random numbers to test.
* Tests for module 'log10l-ieee'.Bruno Haible2012-04-011-0/+45
| | | | | * modules/log10l-ieee-tests: New file. * tests/test-log10l-ieee.c: New file.
* Tests for module 'log10-ieee'.Bruno Haible2012-04-011-0/+45
| | | | | * modules/log10-ieee-tests: New file. * tests/test-log10-ieee.c: New file.
* Tests for module 'log10f-ieee'.Bruno Haible2012-04-012-0/+85
| | | | | | * modules/log10f-ieee-tests: New file. * tests/test-log10f-ieee.c: New file. * tests/test-log10-ieee.h: New file.
* log10: Work around OSF/1 5.1 bug.Bruno Haible2012-04-011-1/+3
| | | | | | | | | | | | | | | * lib/math.in.h (log10): New declaration. * lib/log10.c: New file. * m4/log10.m4 (gl_FUNC_LOG10_WORKS): New macro. (gl_FUNC_LOG10): Invoke it. Set REPLACE_LOG10. * m4/math_h.m4 (gl_MATH_H): Test whether log10 is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10, REPLACE_LOG10. * modules/math (Makefile.am): Substitute GNULIB_LOG10, REPLACE_LOG10. * modules/log10 (Files): Add lib/log10.c. (Depends-on): Add math. (configure.ac): If REPLACE_LOG10 is 1, compile an override. * tests/test-math-c++.cc: Check the declaration of log10. * doc/posix-functions/log10.texi: Mention the OSF/1 5.1 problem.
* log10l tests: More tests.Bruno Haible2012-04-011-2/+13
| | | | | | | | * modules/log10l-tests (Files): Add tests/test-log10l.h, tests/minus-zero.h, tests/randoml.c. (Makefile.am): Add randoml.c to test_log10l_SOURCES. * tests/test-log10l.c: Include <float.h>, minus-zero.h, test-log10l.h. (main): Invoke test_function.
* log10f tests: More tests.Bruno Haible2012-04-011-2/+13
| | | | | | | | * modules/log10f-tests (Files): Add tests/test-log10.h, tests/minus-zero.h, tests/randomf.c. (Makefile.am): Add randomf.c to test_log10f_SOURCES. * tests/test-log10f.c: Include <float.h>, minus-zero.h, test-log10.h. (main): Invoke test_function.
* log10 tests: More tests.Bruno Haible2012-04-012-2/+117
| | | | | | | | | * tests/test-log10.h: New file. * modules/log10-tests (Files): Add tests/test-log10.h, tests/minus-zero.h, tests/randomd.c. (Makefile.am): Add randomd.c to test_log10_SOURCES. * tests/test-log10.c: Include <float.h>, minus-zero.h, test-log10.h. (main): Invoke test_function.
* stdio: don't assume gets any moreEric Blake2012-03-291-3/+1
| | | | | | | | | | | | | | | | | | | Gnulib intentionally does not have a gets module, and now that C11 and glibc have dropped it, we should be more proactive about warning any user on a platform that still has a declaration of this dangerous interface. * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets support. * modules/stdio (Makefile.am): Likewise. * lib/stdio-read.c (gets): Likewise. * tests/test-stdio-c++.cc: Likewise. * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment. * lib/stdio.in.h (gets): Make warning occur in more places. * doc/posix-functions/gets.texi (gets): Update documentation. Reported by Christer Solskogen. Signed-off-by: Eric Blake <eblake@redhat.com>
* Tests for module 'localeconv'.Bruno Haible2012-03-251-0/+72
| | | | | * modules/localeconv-tests: New file. * tests/test-localeconv.c: New file.
* locale: Provide a complete 'struct lconv'.Bruno Haible2012-03-251-2/+0
| | | | | | | * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if 'struct lconv' does not contain int_p_cs_precedes. * tests/test-locale.c (main): Check that 'struct lconv' is complete. * doc/posix-headers/locale.texi: Update.
* locale: Provide a working 'struct lconv'.Bruno Haible2012-03-251-0/+32
| | | | | | | | | | | | * lib/locale.in.h (lconv): Override if REPLACE_STRUCT_LCONV is 1. * m4/locale_h.m4 (gl_LOCALE_H): Set REPLACE_STRUCT_LCONV to 1 if 'struct lconv' does not even contain decimal_point. (gl_LOCALE_H_DEFAULTS): Initialize REPLACE_STRUCT_LCONV. * modules/locale (Makefile.am): Substitute REPLACE_STRUCT_LCONV. * tests/test-locale.c (main): Check that 'struct lconv' is complete. * doc/posix-headers/locale.texi: Mention the problems with 'struct lconv'. Reported by Gianluigi Tiesi <sherpya@netfarm.it>.
* tests: avoid gcc warnings about argv vs. const initializersJim Meyering2012-03-202-2/+2
| | | | | | * tests/test-posix_spawn1.c (main): Cast to "(char *)" to avoid two warnings about discarding 'const' qualifier from pointer target type. * tests/test-posix_spawn2.c (main): Likewise.
* sqrtl: Bypass broken implementation in OpenBSD 5.1/SPARC.Bruno Haible2012-03-141-0/+24
| | | | | | | | | | | | | | * lib/math.in.h (sqrtl): Replace it if REPLACE_SQRTL is 1. * m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): New macro. (gl_FUNC_SQRTL): Invoke it. Set REPLACE_SQRTL to 1 if sqrtl() produces too big rounding errors. * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_SQRTL. * modules/math (Makefile.am): Substitute REPLACE_SQRTL. * modules/sqrtl (configure.ac): Consider REPLACE_SQRTL. (Depends-on): Update conditions. * tests/test-sqrtl.c (my_ldexpl): New function. (main): Add test of a particular value. * doc/posix-functions/sqrtl.texi: Mention the OpenBSD 5.1/SPARC bug.
* Tests for module 'log2l-ieee'.Bruno Haible2012-03-111-0/+45
| | | | | * modules/log2l-ieee-tests: New file. * tests/test-log2l-ieee.c: New file.
* Tests for module 'log2-ieee'.Bruno Haible2012-03-111-0/+45
| | | | | * modules/log2-ieee-tests: New file. * tests/test-log2-ieee.c: New file.
* Tests for module 'log2f-ieee'.Bruno Haible2012-03-112-0/+85
| | | | | | * modules/log2f-ieee-tests: New file. * tests/test-log2f-ieee.c: New file. * tests/test-log2-ieee.h: New file.
* Tests for module 'log2l'.Bruno Haible2012-03-111-0/+58
| | | | | * modules/log2l-tests: New file. * tests/test-log2l.c: New file.
* New module 'log2l'.Bruno Haible2012-03-111-0/+3
| | | | | | | | | | | | | | | * lib/math.in.h (log2l): New declaration. * lib/log2l.c: New file. * m4/log2l.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log2l is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2L, HAVE_DECL_LOG2L, REPLACE_LOG2L. * modules/math (Makefile.am): Substitute GNULIB_LOG2L, HAVE_DECL_LOG2L, REPLACE_LOG2L. * modules/log2l: New file. * tests/test-math-c++.cc: Check the declaration of log2l. * doc/posix-functions/log2l.texi: Mention the new module and the IRIX and OSF/1 problems.
* Tests for module 'log2f'.Bruno Haible2012-03-111-0/+53
| | | | | * modules/log2f-tests: New file. * tests/test-log2f.c: New file.
* New module 'log2f'.Bruno Haible2012-03-111-0/+3
| | | | | | | | | | | | | | | * lib/math.in.h (log2f): New declaration. * lib/log2f.c: New file. * m4/log2f.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether log2f is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG2F, HAVE_DECL_LOG2F, REPLACE_LOG2F. * modules/math (Makefile.am): Substitute GNULIB_LOG2F, HAVE_DECL_LOG2F, REPLACE_LOG2F. * modules/log2f: New file. * tests/test-math-c++.cc: Check the declaration of log2f. * doc/posix-functions/log2f.texi: Mention the new module and the IRIX and OSF/1 and Cygwin problems.