From b1949e77067a6e056a37fef1a2ae341374efdab5 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 24 Feb 2013 06:42:03 -0600 Subject: [PATCH] testsuite: add tests for circular dependencies --- tests/lib1/circular-2.pc | 2 +- tests/lib1/circular-3.pc | 11 +++++++++++ tests/run.sh.in | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/lib1/circular-3.pc diff --git a/tests/lib1/circular-2.pc b/tests/lib1/circular-2.pc index f457fee..04321b9 100644 --- a/tests/lib1/circular-2.pc +++ b/tests/lib1/circular-2.pc @@ -7,5 +7,5 @@ Name: circular-2 Description: A testing pkg-config file Version: 1.2.3 Libs: -lcircular-2 -Requires: circular-1 +Requires: circular-3 Cflags: diff --git a/tests/lib1/circular-3.pc b/tests/lib1/circular-3.pc new file mode 100644 index 0000000..9edce93 --- /dev/null +++ b/tests/lib1/circular-3.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: circular-3 +Description: A testing pkg-config file +Version: 1.2.3 +Libs: -lcircular-3 +Requires: circular-1 +Cflags: diff --git a/tests/run.sh.in b/tests/run.sh.in index 7d1ac93..6873709 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -86,6 +86,10 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists '' 'foo'; echo \$?" \ '0' run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs intermediary-1 intermediary-2" \ '-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz' +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs circular-1" \ + '-lcircular-2 -lcircular-3 -lcircular-1' +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs circular-3" \ + '-lcircular-1 -lcircular-2 -lcircular-3' # 2) tests for PKG_CONFIG_PATH order run_test "PKG_CONFIG_PATH='${selfdir}/lib1${PATH_SEP}${selfdir}/lib2' ${1} --libs foo" \