From: Bruno Haible Date: Mon, 24 Jun 2024 23:09:59 +0000 (+0200) Subject: zsprintf-posix: Add tests. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=4ae432545a1606cf174d590737653d219c3d3dce;p=gnulib.git zsprintf-posix: Add tests. * tests/test-zsprintf-posix.c: New file. * modules/zsprintf-posix-tests: New file. --- diff --git a/ChangeLog b/ChangeLog index 820bcd3d22..3690156667 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-06-24 Bruno Haible + zsprintf-posix: Add tests. + * tests/test-zsprintf-posix.c: New file. + * modules/zsprintf-posix-tests: New file. + zsprintf-posix: New module. * modules/zsprintf-posix: New file. diff --git a/modules/zsprintf-posix-tests b/modules/zsprintf-posix-tests new file mode 100644 index 0000000000..8ea6819c06 --- /dev/null +++ b/modules/zsprintf-posix-tests @@ -0,0 +1,14 @@ +Files: +tests/test-zsprintf-posix.c +tests/test-zsprintf-posix.h +tests/infinity.h +tests/macros.h + +Depends-on: +nan + +configure.ac: + +Makefile.am: +TESTS += test-zsprintf-posix +check_PROGRAMS += test-zsprintf-posix diff --git a/tests/test-zsprintf-posix.c b/tests/test-zsprintf-posix.c new file mode 100644 index 0000000000..b5af845b15 --- /dev/null +++ b/tests/test-zsprintf-posix.c @@ -0,0 +1,36 @@ +/* Test of POSIX compatible zsprintf() function. + Copyright (C) 2007-2024 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include +#include +#include + +#include "macros.h" + +#include "test-zsprintf-posix.h" + +int +main (int argc, char *argv[]) +{ + test_function (zsprintf); + return test_exit_status; +}