>From f50a5a002d05c2a75994896f47457edc60eea7a6 Mon Sep 17 00:00:00 2001 From: Bruno Haible
Date: Sun, 24 Nov 2019 13:12:53 +0100 Subject: [PATCH 2/2] wcstok: Add tests. * tests/test-wcstok.c: New file. * modules/wcstok-tests: New file. --- ChangeLog | 6 ++++++ modules/wcstok-tests | 12 ++++++++++++ tests/test-wcstok.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 modules/wcstok-tests create mode 100644 tests/test-wcstok.c diff --git a/ChangeLog b/ChangeLog index 9e6725a..984792b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2019-11-24 Bruno Haible + wcstok: Add tests. + * tests/test-wcstok.c: New file. + * modules/wcstok-tests: New file. + +2019-11-24 Bruno Haible + wcstok: Work around wrong signature on native Windows. * lib/wchar.in.h (wcstok): Override when REPLACE_WCSTOK is 1. * m4/wcstok.m4 (gl_FUNC_WCSTOK): Check for signature of wcstok. Set diff --git a/modules/wcstok-tests b/modules/wcstok-tests new file mode 100644 index 0000000..57ccd08 --- /dev/null +++ b/modules/wcstok-tests @@ -0,0 +1,12 @@ +Files: +tests/test-wcstok.c +tests/signature.h +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-wcstok +check_PROGRAMS += test-wcstok diff --git a/tests/test-wcstok.c b/tests/test-wcstok.c new file mode 100644 index 0000000..5c6fd51 --- /dev/null +++ b/tests/test-wcstok.c @@ -0,0 +1,53 @@ +/* Test of conversion of wide string to string. + Copyright (C) 2019 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