mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-03 10:10:27 +01:00
check: Exercise all printing options
Add tests for checking the output of various options that print information. For --list-all, a subdirectory with only two packages has been added so that its output doesn't change when more test packages are added to the check directory.
This commit is contained in:
parent
31a9f900e1
commit
c7e12356bc
4 changed files with 47 additions and 2 deletions
|
|
@ -13,7 +13,8 @@ TESTS = \
|
|||
check-idirafter \
|
||||
check-whitespace \
|
||||
check-cmd-options \
|
||||
check-version
|
||||
check-version \
|
||||
check-print-options
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS) \
|
||||
|
|
@ -28,4 +29,6 @@ EXTRA_DIST = \
|
|||
idirafter.pc \
|
||||
conflicts-test.pc \
|
||||
whitespace.pc \
|
||||
fields-blank.pc
|
||||
fields-blank.pc \
|
||||
sub/sub1.pc \
|
||||
sub/sub2.pc
|
||||
|
|
|
|||
32
check/check-print-options
Executable file
32
check/check-print-options
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
. ${srcdir}/common
|
||||
|
||||
# --modversion
|
||||
RESULT=1.0.0
|
||||
run_test --modversion simple
|
||||
|
||||
# --print-variables
|
||||
RESULT="exec_prefix
|
||||
prefix
|
||||
libdir
|
||||
includedir"
|
||||
run_test --print-variables simple
|
||||
|
||||
# --print-provides
|
||||
RESULT="simple = 1.0.0"
|
||||
run_test --print-provides simple
|
||||
|
||||
# --print-requires
|
||||
RESULT=""
|
||||
run_test --print-requires simple
|
||||
|
||||
# --print-requires-private
|
||||
RESULT=""
|
||||
run_test --print-requires-private simple
|
||||
|
||||
# --list-all, limit to a subdirectory
|
||||
RESULT="sub1 Subdirectory package 1 - Test package 1 for subdirectory
|
||||
sub2 Subdirectory package 2 - Test package 2 for subdirectory"
|
||||
PKG_CONFIG_LIBDIR="$srcdir/sub" run_test --list-all
|
||||
5
check/sub/sub1.pc
Normal file
5
check/sub/sub1.pc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Name: Subdirectory package 1
|
||||
Description: Test package 1 for subdirectory
|
||||
Version: 1.0.0
|
||||
Libs: -L/sub/lib -lsub1
|
||||
Cflags: -I/sub/include
|
||||
5
check/sub/sub2.pc
Normal file
5
check/sub/sub2.pc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Name: Subdirectory package 2
|
||||
Description: Test package 2 for subdirectory
|
||||
Version: 2.0.0
|
||||
Libs: -L/sub/lib -lsub2
|
||||
Cflags: -I/sub/include
|
||||
Loading…
Add table
Reference in a new issue