aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-10-12 15:33:04 +0300
committerIvan Komissarov <ABBAPOH@gmail.com>2021-10-14 12:07:12 +0000
commit966689ab499725cb7e7ab1157043b968a1a39e60 (patch)
treeb88b1ed6522e467898a04993a686fba3933418c7 /tests/auto
parent3187199a17e013882b0d0ea7aff9c7b9411e4cd1 (diff)
pkgconfig: fix baseName detection
Change-Id: I83691e0e35cf4bbf9955eb0bad58b5a15bf1779a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/pkgconfig/testdata/base.name.json20
-rw-r--r--tests/auto/pkgconfig/testdata/base.name.pc12
-rw-r--r--tests/auto/pkgconfig/tst_pkgconfig.cpp1
3 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/pkgconfig/testdata/base.name.json b/tests/auto/pkgconfig/testdata/base.name.json
new file mode 100644
index 000000000..a10e905ac
--- /dev/null
+++ b/tests/auto/pkgconfig/testdata/base.name.json
@@ -0,0 +1,20 @@
+{
+ "Name": "Base Name test",
+ "Description": "Checks correct baseName detection",
+ "Version": "1.0.0",
+ "Vars": {
+ "prefix": "/usr",
+ "exec_prefix": "/usr",
+ "libdir": "/usr/lib",
+ "includedir": "/usr/include"
+ },
+ "Libs": [
+ {"Type": "LibraryName", "Value": "simple"}
+ ],
+ "LibsPrivate": [
+ {"Type": "LibraryName", "Value": "m"}
+ ],
+ "Cflags": [
+ {"Type": "IncludePath", "Value": "/usr/include"}
+ ]
+}
diff --git a/tests/auto/pkgconfig/testdata/base.name.pc b/tests/auto/pkgconfig/testdata/base.name.pc
new file mode 100644
index 000000000..2bb3e275e
--- /dev/null
+++ b/tests/auto/pkgconfig/testdata/base.name.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Base Name test
+Description: Checks correct baseName detection
+Version: 1.0.0
+Requires:
+Libs: -lsimple
+Libs.private: -lm
+Cflags: -I${includedir}
diff --git a/tests/auto/pkgconfig/tst_pkgconfig.cpp b/tests/auto/pkgconfig/tst_pkgconfig.cpp
index b05dd4923..53dc696ed 100644
--- a/tests/auto/pkgconfig/tst_pkgconfig.cpp
+++ b/tests/auto/pkgconfig/tst_pkgconfig.cpp
@@ -166,6 +166,7 @@ void TestPkgConfig::pkgConfig_data()
QTest::newRow("tilde") << QStringLiteral("tilde") << QVariantMap();
QTest::newRow("variables") << QStringLiteral("variables") << QVariantMap();
QTest::newRow("whitespace") << QStringLiteral("whitespace") << QVariantMap();
+ QTest::newRow("base.name") << QStringLiteral("base.name") << QVariantMap();
}
void TestPkgConfig::benchSystem()