diff options
Diffstat (limited to 'libpkgconf/tests/api')
-rw-r--r-- | libpkgconf/tests/api/driver.c | 10 | ||||
-rw-r--r-- | libpkgconf/tests/api/testscript | 28 |
2 files changed, 35 insertions, 3 deletions
diff --git a/libpkgconf/tests/api/driver.c b/libpkgconf/tests/api/driver.c index 15b0685..447a223 100644 --- a/libpkgconf/tests/api/driver.c +++ b/libpkgconf/tests/api/driver.c @@ -24,7 +24,6 @@ error_handler (const char* msg, const pkgconf_client_t* c, const void* d) /* Seems it always have a trailing newline char. Probably it still a good * idea to check if it is. Let's see if it ever be missed. - * */ fprintf (stderr, "%s", msg); return true; @@ -127,7 +126,9 @@ main (int argc, const char* argv[]) int r = 1; int max_depth = 2000; - pkgconf_client_set_flags (c, PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS); + const int pkgconf_flags = PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS; + + pkgconf_client_set_flags (c, pkgconf_flags); pkgconf_pkg_t* p = pkgconf_pkg_find (c, path); if (p != NULL) @@ -138,7 +139,9 @@ main (int argc, const char* argv[]) { case dump_cflags: { - pkgconf_client_set_flags (c, PKGCONF_PKG_PKGF_SEARCH_PRIVATE); + pkgconf_client_set_flags (c, + pkgconf_flags | + PKGCONF_PKG_PKGF_SEARCH_PRIVATE); pkgconf_list_t list = PKGCONF_LIST_INITIALIZER; e = pkgconf_pkg_cflags (c, p, &list, max_depth); @@ -152,6 +155,7 @@ main (int argc, const char* argv[]) case dump_libs: { pkgconf_client_set_flags (c, + pkgconf_flags | PKGCONF_PKG_PKGF_SEARCH_PRIVATE | PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS); diff --git a/libpkgconf/tests/api/testscript b/libpkgconf/tests/api/testscript index 0382f87..39341ba 100644 --- a/libpkgconf/tests/api/testscript +++ b/libpkgconf/tests/api/testscript @@ -143,3 +143,31 @@ Security EOO } + +: no-drop +: +: Test that the -framework options are not dropped. +: +{ + +cat <<EOI >=libfoo.pc + Name: libfoo + Description: Foo library + Version: 1.0 + Libs: -L/Users/build/install/lib -lcurl -framework Cocoa -framework IOKit -framework CoreFoundation + EOI + + f = $~/libfoo.pc + + : libs + : + $* --libs $f >>EOO + L /Users/build/install/lib + l curl + -framework + Cocoa + -framework + IOKit + -framework + CoreFoundation + EOO +} |