summaryrefslogtreecommitdiff
path: root/tests/test-xstrtol.sh
Commit message (Collapse)AuthorAgeFilesLines
* tests: Prepare for using valgrind.Bruno Haible2019-03-101-20/+20
| | | | | tests/*.sh: Invoke all test programs through ${CHECKER}. tests/*/*.sh: Likewise.
* xstrtol: prohibit monstrosities like "1bB"Paul Eggert2016-04-271-0/+4
| | | | | | | Problem reported by Young Mo Kang in: http://bugs.gnu.org/23388 * lib/xstrtol.c (__xstrtol): Allow trailing second suffixes like "B" only if the first suffix needs a base. * tests/test-xstrtol.sh: Test this.
* Use ', not `, for quoting output.Paul Eggert2012-01-051-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build-aux/announce-gen (usage, sizes, print_news_deltas) (print_changelog_deltas, get_tool_versions, main program): * build-aux/git-version-gen: * build-aux/gitlog-to-changelog (usage, parse_amend_file): * build-aux/move-if-change (help): * build-aux/useless-if-before-free (usage, main program): * check-module (parse_module_file, usage) (find_included_lib_files, check_module): * lib/argmatch.c (main) [TEST]: * lib/argp-help.c (_help): * lib/getopt1.c (main) [TEST]: * lib/git-merge-changelog.c (usage): * lib/xstrtol-error.c (xstrtol_error): * m4/alloca.m4 (_AC_LIBOBJ_ALLOCA): * m4/argz.m4 (gl_FUNC_ARGZ): * m4/bison.m4 (gl_BISON): * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER): * m4/fpending.m4 (gl_PREREQ_FPENDING): * m4/gc-random.m4 (gl_GC_RANDOM): * m4/intl.m4 (gt_CHECK_DECL): * m4/link-follow.m4 (gl_FUNC_LINK_FOLLOWS_SYMLINK): * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT) (AC_TYPE_UNSIGNED_LONG_LONG_INT): * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): * m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): * m4/onceonly.m4 (AC_CHECK_FUNCS_ONCE): * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): * tests/test-dirname.c (main): * tests/test-getpass.c (main): * tests/test-iconvme.c (main): * tests/test-parse-datetime.c (LOG): * tests/test-xstrtoimax.sh: * tests/test-xstrtol.sh: * tests/test-xstrtoll.sh: * tests/test-xstrtoumax.sh: * tests/unigbrk/test-uc-is-grapheme-break.c (main): * top/GNUmakefile (abort-due-to-no-makefile): Quote 'like this', not `like this', as per the recent change to the GNU coding standards.
* xstrtol-tests: convert to use init.shJim Meyering2010-04-051-30/+25
| | | | | | | * modules/xstrtol-tests (Files): Add tests/init.sh. * tests/test-xstrtol.sh: Invoke "$srcdir/init.sh" and path_prepend_. Use Exit, not exit. Remove uses of $EXEEXT and "./" to run a program in the current dir.
* Work around limitation of an old 'tr' program on Solaris.Bruno Haible2008-04-261-1/+9
|
* Fix test failures on mingw.Bruno Haible2008-04-221-1/+1
|
* * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.Paul Eggert2007-08-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | * lib/xstrtol.h: Don't include exitfail.h; that's now internal to xstrtol.c. Include getopt.h, since xstrtol_fatal's signature depends on it. (xstrtol_error): Remove. (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error but with a different signature. (ATTRIBUTE_NORETURN, __attribute__): New macros. * lib/xstrtol-error.c: Include exitfail.h. (xstrtol_fatal): New function, with a different signature from the old xstrtol_error, so that the caller need not worry about passing in an exit status, or about storage management of the option argument. (xstrtol_error): Now a static function. Redo signature to implement xstrtol_fatal. Output the correct number of hyphens in front of the option so that the caller need not worry about storage management. (N_): New macro. (_): Remove; not used now. * modules/xstrtol: Depend on getopt. * tests/test-xstrtol.c (main): Use new xstrtol_error function instead of old STRTOL_FATAL_ERROR macro. * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior of test program.
* Move xstrtol messages into gnulib domain, when --pobase is used.Eric Blake2007-08-081-0/+64
* lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro... * lib/xstrtol-error.c (xstrtol_error): ...into new file. * modules/xstrtol (Files): Distribute new file. * m4/xstrtol.m4 (gl_XSTRTOL): Build new file. * lib/xstrtol.c (TESTING_XSTRTO): Move tests... * tests/test-xstrtol.c: ...into new file. * tests/test-xstrtoul.c: Also test xstrtoul. * tests/test-xstrtoimax.c: Also test xstrtoimax. * tests/test-xstrtoumax.c: Also test xstrtoumax. * tests/test-xstrtol.sh: Drive the tests. * tests/test-xstrtoimax.sh: Likewise. * tests/test-xstrtoumax.sh: Likewise. * modules/xstrtol-tests: New module. * modules/xstrtoimax-tests: Likewise. * modules/xstrtoumax-tests: Likewise.