aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun_unittests.py7
-rw-r--r--test cases/unit/9 -L -l order/first.pc (renamed from test cases/unit/8 L order/first.pc)2
-rw-r--r--test cases/unit/9 -L -l order/meson.build (renamed from test cases/unit/8 L order/meson.build)0
-rw-r--r--test cases/unit/9 -L -l order/prog.c (renamed from test cases/unit/8 L order/prog.c)0
-rw-r--r--test cases/unit/9 -L -l order/second.pc (renamed from test cases/unit/8 L order/second.pc)2
5 files changed, 7 insertions, 4 deletions
diff --git a/run_unittests.py b/run_unittests.py
index ab41f54..a405b01 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1756,10 +1756,13 @@ class LinuxlikeTests(BasePlatformTests):
self.assertEqual(subprocess.call(installed_exe, env=env), 0)
def test_order_of_l_arguments(self):
- testdir = os.path.join(self.unit_test_dir, '8 L order')
+ testdir = os.path.join(self.unit_test_dir, '9 -L -l order')
os.environ['PKG_CONFIG_PATH'] = testdir
self.init(testdir)
- expected_order = ['-L/me/first', '-L/me/second', '-L/me/third', '-L/me/fourth']
+ # NOTE: .pc file has -Lfoo -lfoo -Lbar -lbar but pkg-config reorders
+ # the flags before returning them to -Lfoo -Lbar -lfoo -lbar
+ expected_order = ['-L/me/first', '-L/me/second','-lfoo1', '-lfoo2',
+ '-L/me/third', '-L/me/fourth', '-lfoo3', '-lfoo4']
with open(os.path.join(self.builddir, 'build.ninja')) as ifile:
for line in ifile:
if expected_order[0] in line:
diff --git a/test cases/unit/8 L order/first.pc b/test cases/unit/9 -L -l order/first.pc
index 8066f6e..3b811b2 100644
--- a/test cases/unit/8 L order/first.pc
+++ b/test cases/unit/9 -L -l order/first.pc
@@ -9,5 +9,5 @@ Description: jonne library
Version: 1.0.0
Requires:
-Libs: -L/me/first -L/me/second
+Libs: -L/me/first -lfoo1 -L/me/second -lfoo2
Cflags: -I${includedir}
diff --git a/test cases/unit/8 L order/meson.build b/test cases/unit/9 -L -l order/meson.build
index cfcf033..cfcf033 100644
--- a/test cases/unit/8 L order/meson.build
+++ b/test cases/unit/9 -L -l order/meson.build
diff --git a/test cases/unit/8 L order/prog.c b/test cases/unit/9 -L -l order/prog.c
index 3a16ac3..3a16ac3 100644
--- a/test cases/unit/8 L order/prog.c
+++ b/test cases/unit/9 -L -l order/prog.c
diff --git a/test cases/unit/8 L order/second.pc b/test cases/unit/9 -L -l order/second.pc
index 602f262..196824b 100644
--- a/test cases/unit/8 L order/second.pc
+++ b/test cases/unit/9 -L -l order/second.pc
@@ -9,5 +9,5 @@ Description: jonne2 library
Version: 1.0.0
Requires:
-Libs: -L/me/third -L/me/fourth
+Libs: -L/me/third -lfoo3 -L/me/fourth -lfoo4
Cflags: -I${includedir}