This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=eca1fdbfe00d1b0bb8de2c96cbdba23164b46c64

commit eca1fdbfe00d1b0bb8de2c96cbdba23164b46c64
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Sep 14 21:34:49 2018 +0200

    libdpkg: Check that the public headers can be compiled with C++
---
 debian/changelog            |  1 +
 lib/dpkg/t/.gitignore       |  1 +
 lib/dpkg/t/Makefile.am      |  3 ++
 lib/dpkg/t/t-headers-cpp.cc | 82 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 87 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 277da7a0f..ef297822c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -296,6 +296,7 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
     - Improve coverage of perl unit tests.
     - Delete fixup lines from i18nspector output instead of emptying them.
     - Add new codespell author test.
+    - Add new test that the public libdpkg headers can be compiled with C++.
 
   [ Josh Triplett ]
   * Perl: Replace all calls to Cwd::cwd with Cwd::getcwd; the former calls
diff --git a/lib/dpkg/t/.gitignore b/lib/dpkg/t/.gitignore
index 38bfe340f..db7126c04 100644
--- a/lib/dpkg/t/.gitignore
+++ b/lib/dpkg/t/.gitignore
@@ -11,6 +11,7 @@ t-ehandle
 t-error
 t-file
 t-fsys-hash
+t-headers-cpp
 t-macros
 t-mod-db
 t-namevalue
diff --git a/lib/dpkg/t/Makefile.am b/lib/dpkg/t/Makefile.am
index dcecc6155..9e83836e4 100644
--- a/lib/dpkg/t/Makefile.am
+++ b/lib/dpkg/t/Makefile.am
@@ -17,11 +17,14 @@ TEST_ENV_VARS = \
        DPKG_PROGTAR=$(TAR) \
        $(nil)
 
+t_headers_cpp_SOURCES = t-headers-cpp.cc
+
 # The tests are sorted in order of increasing complexity.
 test_programs = \
        t-test \
        t-test-skip \
        t-macros \
+       t-headers-cpp \
        t-c-ctype \
        t-namevalue \
        t-ehandle \
diff --git a/lib/dpkg/t/t-headers-cpp.cc b/lib/dpkg/t/t-headers-cpp.cc
new file mode 100644
index 000000000..b5becf9ae
--- /dev/null
+++ b/lib/dpkg/t/t-headers-cpp.cc
@@ -0,0 +1,82 @@
+/*
+ * libdpkg - Debian packaging suite library routines
+ * t-headers-cpp.cc - test C++ inclusion of headers
+ *
+ * Copyright © 2018 Guillem Jover <[email protected]>
+ *
+ * This 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This 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>
+#include <compat.h>
+
+#include <cstdbool>
+
+#include <dpkg/ar.h>
+#include <dpkg/arch.h>
+#include <dpkg/atomic-file.h>
+#include <dpkg/buffer.h>
+#include <dpkg/c-ctype.h>
+#include <dpkg/color.h>
+#include <dpkg/command.h>
+#include <dpkg/compress.h>
+#include <dpkg/db-ctrl.h>
+#include <dpkg/db-fsys.h>
+#include <dpkg/deb-version.h>
+#include <dpkg/debug.h>
+#include <dpkg/dir.h>
+#include <dpkg/dlist.h>
+#include <dpkg/dpkg-db.h>
+#include <dpkg/dpkg.h>
+#include <dpkg/ehandle.h>
+#include <dpkg/error.h>
+#include <dpkg/fdio.h>
+#include <dpkg/file.h>
+#include <dpkg/fsys.h>
+#include <dpkg/glob.h>
+#include <dpkg/i18n.h>
+#include <dpkg/macros.h>
+#include <dpkg/namevalue.h>
+#include <dpkg/options.h>
+#include <dpkg/pager.h>
+#include <dpkg/parsedump.h>
+#include <dpkg/path.h>
+#include <dpkg/pkg-array.h>
+#include <dpkg/pkg-files.h>
+#include <dpkg/pkg-format.h>
+#include <dpkg/pkg-list.h>
+#include <dpkg/pkg-queue.h>
+#include <dpkg/pkg-show.h>
+#include <dpkg/pkg-spec.h>
+#include <dpkg/pkg.h>
+#include <dpkg/progname.h>
+#include <dpkg/program.h>
+#include <dpkg/progress.h>
+#include <dpkg/report.h>
+#include <dpkg/string.h>
+#include <dpkg/subproc.h>
+#include <dpkg/tarfn.h>
+#include <dpkg/test.h>
+#include <dpkg/treewalk.h>
+#include <dpkg/trigdeferred.h>
+#include <dpkg/triglib.h>
+#include <dpkg/varbuf.h>
+#include <dpkg/version.h>
+
+TEST_ENTRY(test)
+{
+       test_plan(1);
+
+       test_pass(true);
+}

-- 
Dpkg.Org's dpkg

Reply via email to