]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
unilbrk/base: Add tests.
authorBruno Haible <bruno@clisp.org>
Fri, 3 Oct 2025 19:51:01 +0000 (21:51 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 3 Oct 2025 19:51:01 +0000 (21:51 +0200)
* tests/unilbrk/test-unilbrk-h.c: New file.
* modules/unilbrk/base-tests: New file.
* tests/unilbrk/test-unilbrk-h-c++.cc: New file.
* modules/unilbrk/base-c++-tests: New file.

ChangeLog
modules/unilbrk/base-c++-tests [new file with mode: 0644]
modules/unilbrk/base-tests [new file with mode: 0644]
tests/unilbrk/test-unilbrk-h-c++.cc [new file with mode: 0644]
tests/unilbrk/test-unilbrk-h.c [new file with mode: 0644]

index 0bfeb472600bfcbc9dd8cd9d1b367a0443188e5a..95af443f948b449e3769ad2f11e10761e643d548 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2025-10-03  Bruno Haible  <bruno@clisp.org>
 
+       unilbrk/base: Add tests.
+       * tests/unilbrk/test-unilbrk-h.c: New file.
+       * modules/unilbrk/base-tests: New file.
+       * tests/unilbrk/test-unilbrk-h-c++.cc: New file.
+       * modules/unilbrk/base-c++-tests: New file.
+
        uniwbrk/base: Add tests.
        * tests/uniwbrk/test-uniwbrk-h.c: New file.
        * modules/uniwbrk/base-tests: New file.
diff --git a/modules/unilbrk/base-c++-tests b/modules/unilbrk/base-c++-tests
new file mode 100644 (file)
index 0000000..2369f32
--- /dev/null
@@ -0,0 +1,18 @@
+Files:
+tests/unilbrk/test-unilbrk-h-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-unilbrk-h-c++
+check_PROGRAMS += test-unilbrk-h-c++
+test_unilbrk_h_c___SOURCES = unilbrk/test-unilbrk-h-c++.cc
+test_unilbrk_h_c___LDADD = $(LDADD) $(LIBUNISTRING)
+endif
diff --git a/modules/unilbrk/base-tests b/modules/unilbrk/base-tests
new file mode 100644 (file)
index 0000000..f3171b8
--- /dev/null
@@ -0,0 +1,13 @@
+Files:
+tests/unilbrk/test-unilbrk-h.c
+
+Depends-on:
+unilbrk/base-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-unilbrk-h
+check_PROGRAMS += test-unilbrk-h
+test_unilbrk_h_SOURCES = unilbrk/test-unilbrk-h.c
+test_unilbrk_h_LDADD = $(LDADD) $(LIBUNISTRING)
diff --git a/tests/unilbrk/test-unilbrk-h-c++.cc b/tests/unilbrk/test-unilbrk-h-c++.cc
new file mode 100644 (file)
index 0000000..d1459a2
--- /dev/null
@@ -0,0 +1,25 @@
+/* Test of <unilbrk.h> in C++ mode.
+   Copyright (C) 2025 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 <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unilbrk.h>
+
+int
+main ()
+{
+}
diff --git a/tests/unilbrk/test-unilbrk-h.c b/tests/unilbrk/test-unilbrk-h.c
new file mode 100644 (file)
index 0000000..c06cbee
--- /dev/null
@@ -0,0 +1,26 @@
+/* Test of <unilbrk.h>.
+   Copyright (C) 2025 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 <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <unilbrk.h>
+
+int
+main (void)
+{
+  return 0;
+}