main: remove whitespace added for compatibility with older pkg-config (closes #113)

pull/116/head
William Pitcock 2017-02-07 10:11:12 -06:00
parent b0c36cd128
commit 2dcd749601
10 changed files with 77 additions and 77 deletions

2
main.c
View File

@ -1160,7 +1160,7 @@ main(int argc, char *argv[])
out_println: out_println:
if (want_flags & (PKG_CFLAGS|PKG_LIBS)) if (want_flags & (PKG_CFLAGS|PKG_LIBS))
printf(" \n"); printf("\n");
out: out:
pkgconf_client_deinit(&pkg_client); pkgconf_client_deinit(&pkg_client);

View File

@ -46,7 +46,7 @@ libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lfoo \n" \ -o inline:"-L/test/lib -lfoo \n" \
pkgconf --libs foo pkgconf --libs foo
} }
@ -54,7 +54,7 @@ libs_cflags_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \
pkgconf --cflags --libs foo pkgconf --cflags --libs foo
} }
@ -63,7 +63,7 @@ libs_cflags_version_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \
pkgconf --cflags --libs 'foo > 1.2' pkgconf --cflags --libs 'foo > 1.2'
} }
@ -71,7 +71,7 @@ libs_cflags_version_multiple_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/test/include/foo -fPIC -L/test/lib -lbar -lfoo \n" \ -o inline:"-I/test/include/foo -fPIC -L/test/lib -lbar -lfoo \n" \
pkgconf --cflags --libs 'foo > 1.2 bar >= 1.3' pkgconf --cflags --libs 'foo > 1.2 bar >= 1.3'
} }
@ -79,7 +79,7 @@ libs_cflags_version_multiple_coma_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/test/include/foo -fPIC -L/test/lib -lbar -lfoo \n" \ -o inline:"-I/test/include/foo -fPIC -L/test/lib -lbar -lfoo \n" \
pkgconf --cflags --libs 'foo > 1.2,bar >= 1.3' pkgconf --cflags --libs 'foo > 1.2,bar >= 1.3'
} }
@ -87,7 +87,7 @@ libs_cflags_version_alt_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \
pkgconf --cflags --libs 'foo' '>' '1.2' pkgconf --cflags --libs 'foo' '>' '1.2'
} }
@ -95,7 +95,7 @@ libs_cflags_version_different_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \
pkgconf --cflags --libs 'foo' '!=' '1.3.0' pkgconf --cflags --libs 'foo' '!=' '1.3.0'
} }
@ -203,7 +203,7 @@ libs_intermediary_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz \n" \ -o inline:"-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz \n" \
pkgconf --libs intermediary-1 intermediary-2 pkgconf --libs intermediary-1 intermediary-2
} }
@ -211,7 +211,7 @@ libs_circular1_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lcircular-1 -lcircular-2 -lcircular-3 \n" \ -o inline:"-lcircular-1 -lcircular-2 -lcircular-3 \n" \
pkgconf --libs circular-1 pkgconf --libs circular-1
} }
@ -219,14 +219,14 @@ libs_circular2_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lcircular-3 -lcircular-1 -lcircular-2 \n" \ -o inline:"-lcircular-3 -lcircular-1 -lcircular-2 \n" \
pkgconf --libs circular-3 pkgconf --libs circular-3
} }
libs_circular_directpc_body() libs_circular_directpc_body()
{ {
atf_check \ atf_check \
-o inline:"-lcircular-1 -lcircular-2 -lcircular-3 \n" \ -o inline:"-lcircular-1 -lcircular-2 -lcircular-3 \n" \
pkgconf --libs ${selfdir}/lib1/circular-3.pc pkgconf --libs ${selfdir}/lib1/circular-3.pc
} }
@ -234,7 +234,7 @@ libs_static_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"/libfoo.a -pthread \n" \ -o inline:"/libfoo.a -pthread \n" \
pkgconf --libs static-archive-libs pkgconf --libs static-archive-libs
} }
@ -242,7 +242,7 @@ libs_static_ordering_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lbar -lfoo \n" \ -o inline:"-L/test/lib -lbar -lfoo \n" \
pkgconf --libs foo bar pkgconf --libs foo bar
} }
@ -250,20 +250,20 @@ pkg_config_path_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1${PATH_SEP}${selfdir}/lib2" export PKG_CONFIG_PATH="${selfdir}/lib1${PATH_SEP}${selfdir}/lib2"
atf_check \ atf_check \
-o inline:"-L/test/lib -lfoo \n" \ -o inline:"-L/test/lib -lfoo \n" \
pkgconf --libs foo pkgconf --libs foo
atf_check \ atf_check \
-o inline:"-L/test/lib -lbar -lfoo \n" \ -o inline:"-L/test/lib -lbar -lfoo \n" \
pkgconf --libs bar pkgconf --libs bar
} }
with_path_body() with_path_body()
{ {
atf_check \ atf_check \
-o inline:"-L/test/lib -lfoo \n" \ -o inline:"-L/test/lib -lfoo \n" \
pkgconf --with-path=${selfdir}/lib1 --with-path=${selfdir}/lib2 --libs foo pkgconf --with-path=${selfdir}/lib1 --with-path=${selfdir}/lib2 --libs foo
atf_check \ atf_check \
-o inline:"-L/test/lib -lbar -lfoo \n" \ -o inline:"-L/test/lib -lbar -lfoo \n" \
pkgconf --with-path=${selfdir}/lib1 --with-path=${selfdir}/lib2 --libs bar pkgconf --with-path=${selfdir}/lib1 --with-path=${selfdir}/lib2 --libs bar
} }
@ -271,7 +271,7 @@ nolibs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:" \n" \ -o inline:"\n" \
pkgconf --libs nolib pkgconf --libs nolib
} }
@ -279,7 +279,7 @@ nocflags_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:" \n" \ -o inline:"\n" \
pkgconf --cflags nocflag pkgconf --cflags nocflag
} }
@ -287,7 +287,7 @@ arbitary_path_body()
{ {
cp ${selfdir}/lib1/foo.pc . cp ${selfdir}/lib1/foo.pc .
atf_check \ atf_check \
-o inline:"-L/test/lib -lfoo \n" \ -o inline:"-L/test/lib -lfoo \n" \
pkgconf --libs foo.pc pkgconf --libs foo.pc
} }

View File

@ -12,7 +12,7 @@ modversion_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"1.0.1 \n" \ -o inline:"1.0.1 \n" \
pkgconf --modversion pkg-config pkgconf --modversion pkg-config
} }
@ -20,7 +20,7 @@ variable_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"/test \n" \ -o inline:"/test \n" \
pkgconf --variable=prefix foo pkgconf --variable=prefix foo
} }
@ -28,7 +28,7 @@ define_variable_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"/test2 \n" \ -o inline:"/test2 \n" \
pkgconf --define-variable=prefix=/test2 --variable=prefix foo pkgconf --define-variable=prefix=/test2 --variable=prefix foo
} }
@ -36,7 +36,7 @@ global_variable_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"${selfdir}/lib1 \n" -o inline:"${selfdir}/lib1 \n"
pkgconf --exists -foo pkgconf --exists -foo
} }
@ -44,7 +44,7 @@ argv_parse_3_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \ -o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \
pkgconf --libs argv-parse-3 pkgconf --libs argv-parse-3
} }
@ -52,10 +52,10 @@ tilde_quoting_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L~ -ltilde \n" \ -o inline:"-L~ -ltilde \n" \
pkgconf --libs tilde-quoting pkgconf --libs tilde-quoting
atf_check \ atf_check \
-o inline:"-I~ \n" \ -o inline:"-I~ \n" \
pkgconf --cflags tilde-quoting pkgconf --cflags tilde-quoting
} }
@ -63,6 +63,6 @@ paren_quoting_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L\$(libdir) -ltilde \n" \ -o inline:"-L\$(libdir) -ltilde \n" \
pkgconf --libs paren-quoting pkgconf --libs paren-quoting
} }

View File

@ -10,7 +10,7 @@ libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lconflicts \n" \ -o inline:"-L/test/lib -lconflicts \n" \
pkgconf --libs conflicts pkgconf --libs conflicts
} }
@ -18,6 +18,6 @@ ignore_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lconflicts \n" \ -o inline:"-L/test/lib -lconflicts \n" \
pkgconf --ignore-conflicts --libs conflicts pkgconf --ignore-conflicts --libs conflicts
} }

View File

@ -9,12 +9,12 @@ libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-F/test/lib -framework framework-1 \n" \ -o inline:"-F/test/lib -framework framework-1 \n" \
pkgconf --libs framework-1 pkgconf --libs framework-1
atf_check \ atf_check \
-o inline:"-F/test/lib -framework framework-2 -framework framework-1 \n" \ -o inline:"-F/test/lib -framework framework-2 -framework framework-1 \n" \
pkgconf --libs framework-2 pkgconf --libs framework-2
atf_check \ atf_check \
-o inline:"-F/test/lib -framework framework-2 -framework framework-1 \n" \ -o inline:"-F/test/lib -framework framework-2 -framework framework-1 \n" \
pkgconf --libs framework-1 framework-2 pkgconf --libs framework-1 framework-2
} }

View File

@ -25,7 +25,7 @@ comments_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lfoo \n" \ -o inline:"-lfoo \n" \
pkgconf --libs comments pkgconf --libs comments
} }
@ -33,7 +33,7 @@ comments_in_fields_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lfoo \n" \ -o inline:"-lfoo \n" \
pkgconf --libs comments-in-fields pkgconf --libs comments-in-fields
} }
@ -41,7 +41,7 @@ dos_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib/dos-lineendings -ldos-lineendings \n" \ -o inline:"-L/test/lib/dos-lineendings -ldos-lineendings \n" \
pkgconf --libs dos-lineendings pkgconf --libs dos-lineendings
} }
@ -49,7 +49,7 @@ no_trailing_newline_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/test/include/no-trailing-newline \n" \ -o inline:"-I/test/include/no-trailing-newline \n" \
pkgconf --cflags no-trailing-newline pkgconf --cflags no-trailing-newline
} }
@ -57,7 +57,7 @@ argv_parse_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-llib-3 -llib-1 -llib-2 -lpthread \n" \ -o inline:"-llib-3 -llib-1 -llib-2 -lpthread \n" \
pkgconf --libs argv-parse pkgconf --libs argv-parse
} }
@ -74,7 +74,7 @@ argv_parse_3_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \ -o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \
pkgconf --libs argv-parse-3 pkgconf --libs argv-parse-3
} }
@ -82,10 +82,10 @@ tilde_quoting_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L~ -ltilde \n" \ -o inline:"-L~ -ltilde \n" \
pkgconf --libs tilde-quoting pkgconf --libs tilde-quoting
atf_check \ atf_check \
-o inline:"-I~ \n" \ -o inline:"-I~ \n" \
pkgconf --cflags tilde-quoting pkgconf --cflags tilde-quoting
} }
@ -93,7 +93,7 @@ paren_quoting_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L\$(libdir) -ltilde \n" \ -o inline:"-L\$(libdir) -ltilde \n" \
pkgconf --libs paren-quoting pkgconf --libs paren-quoting
} }
@ -110,7 +110,7 @@ quoted_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-DQUOTED=\\\"bla\\\" \n" \ -o inline:"-DQUOTED=\\\"bla\\\" \n" \
pkgconf --cflags quotes pkgconf --cflags quotes
} }
@ -118,7 +118,7 @@ flag_order_1_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar \n" \ -o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar \n" \
pkgconf --libs flag-order-1 pkgconf --libs flag-order-1
} }
@ -126,7 +126,7 @@ flag_order_2_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar -lfoo \n" \ -o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar -lfoo \n" \
pkgconf --libs flag-order-1 foo pkgconf --libs flag-order-1 foo
} }
@ -134,7 +134,7 @@ flag_order_3_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group \n" \ -o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group \n" \
pkgconf --libs flag-order-3 pkgconf --libs flag-order-3
} }
@ -142,7 +142,7 @@ flag_order_4_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group -lfoo \n" \ -o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group -lfoo \n" \
pkgconf --libs flag-order-3 foo pkgconf --libs flag-order-3 foo
} }
@ -150,7 +150,7 @@ variable_whitespace_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/test/include \n" \ -o inline:"-I/test/include \n" \
pkgconf --cflags variable-whitespace pkgconf --cflags variable-whitespace
} }
@ -158,6 +158,6 @@ fragment_quoting_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -DQUOTED='\"/test/share/doc\"' \n" \ -o inline:"-fPIC -I/test/include/foo -DQUOTED='\"/test/share/doc\"' \n" \
pkgconf --cflags fragment-quoting pkgconf --cflags fragment-quoting
} }

View File

@ -26,7 +26,7 @@ provides = 1.2.3
-o inline:"${OUTPUT}" \ -o inline:"${OUTPUT}" \
pkgconf --print-provides provides pkgconf --print-provides provides
atf_check \ atf_check \
-o inline:"-lfoo \n" \ -o inline:"-lfoo \n" \
pkgconf --libs provides-request-simple pkgconf --libs provides-request-simple
atf_check \ atf_check \
-e ignore \ -e ignore \

View File

@ -77,11 +77,11 @@ keep_system_libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" LIBRARY_PATH="/test/local/lib" export PKG_CONFIG_PATH="${selfdir}/lib1" LIBRARY_PATH="/test/local/lib"
atf_check \ atf_check \
-o inline:" \n" \ -o inline:"\n" \
pkgconf --libs-only-L cflags-libs-only pkgconf --libs-only-L cflags-libs-only
atf_check \ atf_check \
-o inline:"-L/test/local/lib \n" \ -o inline:"-L/test/local/lib \n" \
pkgconf --libs-only-L --keep-system-libs cflags-libs-only pkgconf --libs-only-L --keep-system-libs cflags-libs-only
} }
@ -89,7 +89,7 @@ libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/local/lib -lfoo \n" \ -o inline:"-L/test/local/lib -lfoo \n" \
pkgconf --libs cflags-libs-only pkgconf --libs cflags-libs-only
} }
@ -97,7 +97,7 @@ libs_only_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/local/lib -lfoo \n" \ -o inline:"-L/test/local/lib -lfoo \n" \
pkgconf --libs-only-L --libs-only-l cflags-libs-only pkgconf --libs-only-L --libs-only-l cflags-libs-only
} }
@ -105,10 +105,10 @@ libs_never_mergeback_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/bar/lib -lfoo1 \n" \ -o inline:"-L/test/bar/lib -lfoo1 \n" \
pkgconf --libs prefix-foo1 pkgconf --libs prefix-foo1
atf_check \ atf_check \
-o inline:"-L/test/bar/lib -lfoo1 -lfoo2 \n" \ -o inline:"-L/test/bar/lib -lfoo1 -lfoo2 \n" \
pkgconf --libs prefix-foo1 prefix-foo2 pkgconf --libs prefix-foo1 prefix-foo2
} }
@ -116,7 +116,7 @@ cflags_only_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/test/local/include/foo \n" \ -o inline:"-I/test/local/include/foo \n" \
pkgconf --cflags-only-I --cflags-only-other cflags-libs-only pkgconf --cflags-only-I --cflags-only-other cflags-libs-only
} }
@ -124,7 +124,7 @@ cflags_never_mergeback_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/test/bar/include/foo -DBAR -fPIC -DFOO \n" \ -o inline:"-I/test/bar/include/foo -DBAR -fPIC -DFOO \n" \
pkgconf --cflags prefix-foo1 prefix-foo2 pkgconf --cflags prefix-foo1 prefix-foo2
} }
@ -132,7 +132,7 @@ incomplete_libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:" \n" \ -o inline:"\n" \
pkgconf --libs incomplete pkgconf --libs incomplete
} }
@ -140,7 +140,7 @@ incomplete_cflags_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:" \n" \ -o inline:"\n" \
pkgconf --cflags incomplete pkgconf --cflags incomplete
} }
@ -148,7 +148,7 @@ isystem_munge_order_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-isystem /opt/bad/include -isystem /opt/bad2/include \n" \ -o inline:"-isystem /opt/bad/include -isystem /opt/bad2/include \n" \
pkgconf --cflags isystem pkgconf --cflags isystem
} }
@ -164,7 +164,7 @@ idirafter_munge_order_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-idirafter /opt/bad/include -idirafter /opt/bad2/include \n" \ -o inline:"-idirafter /opt/bad/include -idirafter /opt/bad2/include \n" \
pkgconf --cflags idirafter pkgconf --cflags idirafter
} }
@ -180,7 +180,7 @@ idirafter_ordering_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-I/opt/bad/include1 -idirafter -I/opt/bad/include2 -I/opt/bad/include3 \n" \ -o inline:"-I/opt/bad/include1 -idirafter -I/opt/bad/include2 -I/opt/bad/include3 \n" \
pkgconf --cflags idirafter-ordering pkgconf --cflags idirafter-ordering
} }
@ -188,7 +188,7 @@ pcpath_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib2" export PKG_CONFIG_PATH="${selfdir}/lib2"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo \n" \ -o inline:"-fPIC -I/test/include/foo \n" \
pkgconf --cflags ${selfdir}/lib3/bar.pc pkgconf --cflags ${selfdir}/lib3/bar.pc
} }
@ -196,12 +196,12 @@ sysroot_munge_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="/sysroot" export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="/sysroot"
atf_check \ atf_check \
-o inline:"-L/sysroot/lib -lfoo \n" \ -o inline:"-L/sysroot/lib -lfoo \n" \
pkgconf --libs sysroot-dir pkgconf --libs sysroot-dir
export PKG_CONFIG_SYSROOT_DIR="/sysroot2" export PKG_CONFIG_SYSROOT_DIR="/sysroot2"
atf_check \ atf_check \
-o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \ -o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \
pkgconf --libs sysroot-dir pkgconf --libs sysroot-dir
} }

View File

@ -17,7 +17,7 @@ libs_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lbar -lfoo \n" \ -o inline:"-L/test/lib -lbar -lfoo \n" \
pkgconf --libs bar pkgconf --libs bar
} }
@ -25,7 +25,7 @@ libs_cflags_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -L/test/lib -lbaz \n" \ -o inline:"-fPIC -I/test/include/foo -L/test/lib -lbaz \n" \
pkgconf --libs --cflags baz pkgconf --libs --cflags baz
} }
@ -33,7 +33,7 @@ libs_static_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lbaz -L/test/lib -lzee -L/test/lib -lfoo \n" \ -o inline:"-L/test/lib -lbaz -L/test/lib -lzee -L/test/lib -lfoo \n" \
pkgconf --static --libs baz pkgconf --static --libs baz
} }
@ -41,7 +41,7 @@ libs_static_pure_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-L/test/lib -lbaz -L/test/lib -lfoo \n" \ -o inline:"-L/test/lib -lbaz -L/test/lib -lfoo \n" \
pkgconf --static --pure --libs baz pkgconf --static --pure --libs baz
} }
@ -49,7 +49,7 @@ argv_parse2_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \ -o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \
pkgconf --static --libs argv-parse-2 pkgconf --static --libs argv-parse-2
} }
@ -57,7 +57,7 @@ static_cflags_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-fPIC -I/test/include/foo -DFOO_STATIC \n" \ -o inline:"-fPIC -I/test/include/foo -DFOO_STATIC \n" \
pkgconf --static --cflags baz pkgconf --static --cflags baz
} }
@ -65,7 +65,7 @@ private_duplication_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lprivate -lfoo -lbaz -lzee -lbar -lfoo \n" \ -o inline:"-lprivate -lfoo -lbaz -lzee -lbar -lfoo \n" \
pkgconf --static --libs-only-l private-libs-duplication pkgconf --static --libs-only-l private-libs-duplication
} }
@ -73,7 +73,7 @@ libs_static2_body()
{ {
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \ atf_check \
-o inline:"-lbar -lbar-private -L/test/lib -lfoo \n" \ -o inline:"-lbar -lbar-private -L/test/lib -lfoo \n" \
pkgconf --static --libs static-libs pkgconf --static --libs static-libs
} }
@ -83,6 +83,6 @@ missing_body()
atf_check \ atf_check \
-s exit:1 \ -s exit:1 \
-e ignore \ -e ignore \
-o inline:" \n" \ -o inline:"\n" \
pkgconf --cflags missing-require pkgconf --cflags missing-require
} }

View File

@ -11,7 +11,7 @@ cflags_body()
export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_PATH="${selfdir}/lib1"
export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}" export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}"
atf_check \ atf_check \
-o inline:"-fPIC -I${SYSROOT_DIR}/test/include/foo \n" \ -o inline:"-fPIC -I${SYSROOT_DIR}/test/include/foo \n" \
pkgconf --cflags baz pkgconf --cflags baz
} }