Commit graph

24 commits

Author SHA1 Message Date
Dan Nicholson
a465eacaf6 Add test to exercise broken command option handling
The ancient bundled popt mishandles some cases of option parsing.

http://lists.freedesktop.org/archives/pkg-config/2010-March/000508.html

Add a test program to exercise it. This should encourage people to use
an external popt until we have a better fix.
2010-06-16 16:49:52 -07:00
Tollef Fog Heen
66aa02a60b Make sure to distribute the blank fields .pc file too 2010-05-28 18:09:10 +02:00
Tollef Fog Heen
4c6ff1c3d5 Add test case for empty fields
Make sure we don't run into the bug fixed by 6a27c57 again.
2010-05-27 22:23:40 +02:00
Tollef Fog Heen
d9077956e2 Fix up test framework to better report errors when pkg-config exits non-zero 2010-05-27 22:17:54 +02:00
Tollef Fog Heen
2ce485c65d Allow : and = unescaped in output too 2010-05-27 21:48:52 +02:00
Tollef Fog Heen
37d59a0c44 Distcheck fixes
Various small fixes to make distcheck pass
2010-05-23 23:31:14 +02:00
Tollef Fog Heen
69a7eaa676 Make it possible to escape paths containing special shell characters
Allow paths and other components to contain shell metacharacters, but
escape them on output.  White space has to be escaped in the input
files using quotes or backslashes

Freedesktop.org #3571
2010-05-23 23:11:40 +02:00
Tollef Fog Heen
c5a3105f41 Handle -idirafter specially
Don't split -idirafter from its argument.

Fixes Freedesktop #23480
2010-05-09 09:43:10 +02:00
Tollef Fog Heen
1bcb18ca35 Fix include path for check/common 2009-06-30 03:47:49 +02:00
Tollef Fog Heen
e4d39435b9 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* check/check-missing, check/check-libs,
	check/check-requires-private: Handle the case of indirect being
	enabled correctly in checks.
2009-03-30 22:03:38 +02:00
Tollef Fog Heen
f37f04a78a 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* check/common, check/config.sh.in, check/Makefile.am,
	configure.in: Make it possible to check for configure variables in
	the check scripts.  So far, only direct/indirect is exposed.
2009-03-30 21:50:01 +02:00
Tollef Fog Heen
669bfe2e0d 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg.[ch], main.c, check/check-missing: Don't recurse Requires at
	all unless we need to.  Add check.  Again, thanks to Loïc Minier
	for most of the idea and the implementation.
2009-03-30 20:49:17 +02:00
Tollef Fog Heen
02d5ae3fb6 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* pkg.[ch], parse.[ch], main.c, check/Makefile.am,
	check/check-missing, check/missing-requires-private.pc:
	Skip Requires.private unless we need to look at them for cflags.
	Add test case.  Thanks to Loïc Minier for most of the idea and the
	implementation.  Debian #475031
2009-03-30 20:40:53 +02:00
Tollef Fog Heen
34657e444f 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* check/common: Run all tests in the C locale
2009-03-30 20:23:04 +02:00
Tollef Fog Heen
4070cc2339 2009-03-30 Tollef Fog Heen <tfheen@err.no>
* check/common: Add support for non-zero return codes to test
	framework.  Thanks to Loïc Minier for the idea.
2009-03-30 20:14:33 +02:00
Tollef Fog Heen
69dafea1c8 2008-03-23 Tollef Fog Heen <tfheen@err.no>
* check/check-conflicts, check/conflicts-test.pc: New test,
       testing that conflicts work as they should.

       * pkg.c (verify_package): Make the conflicts check not only check
       package versions, but also package names.  This makes conflicts
       functional, something they were not before.
2008-03-23 21:39:07 +01:00
Tollef Fog Heen
15e72cef72 2008-03-23 Tollef Fog Heen <tfheen@err.no>
* check/check-requires-private: Remove unnecessary set -x
2008-03-23 21:11:25 +01:00
Tollef Fog Heen
3954a7ee3e 2008-03-23 Tollef Fog Heen <tfheen@err.no>
* check/check-cflags, check/check-define-variable,
	check/check-includedir, check/check-libs,
	check/check-libs-private, check/check-requires-private: Replace
	the crazy -d ~root check with a more proper way to just make sure
	we are running under a POSIX shell.  Thanks to Kjetil Torgrim
	Homme for the tip about using getconf PATH.
2008-03-23 21:07:39 +01:00
Tollef Fog Heen
9e5bcc26f2 2008-01-16 Tollef Fog Heen <tfheen@err.no>
* check/check-requires-private: Fix up test case.  We want to get
	the private -I option in all cases.
2008-01-16 23:46:58 +01:00
Tollef Fog Heen
3d673211a7 Add includedir test 2005-08-27 09:05:14 +00:00
Tollef Fog Heen
145dba778d Add solaris workaround for tests
/bin/sh on solaris isn't POSIX compliant, so we just exec a POSIX
shell on Solaris.
2005-08-22 10:41:08 +00:00
Arch Librarian
29afc67918 2005-06-27 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-06-27 19:53:05 GMT
2005-06-27  Tollef Fog Heen  <tfheen@err.no>

    All those Requires.private changes are thanks to James
    Henstridge.  Thanks!

    * check/private-dep.pc, check/public-dep.pc,
      check/requires-test.pc: New files, data for the
    check-requires-private test.

    * check/check-requires-private: New test to check for
    Requires.private support.

    * check/Makefile.am (EXTRA_DIST, TESTS): Add Requires.private
    test.

    * pkg.h (struct _Package): Add requires_private

    * pkg.c (get_requires_private, fill_list_single_package)
    (fill_list, verify_package, verify_package, get_merged)
    (get_merged_from_back, get_multi_merged)
    (get_multi_merged_from_back, package_get_l_libs)
    (packages_get_l_libs, package_get_L_libs, packages_get_L_libs)
    (package_get_other_libs, packages_get_other_libs)
    (package_get_I_cflags, packages_get_I_cflags)
    (package_get_other_cflags, packages_get_other_cflags): Handle
    private requires and cascading changes.

    * parse.c (parse_requires_private, parse_conflicts)
    (parse_package_file): Handle Requires.private
2005-07-14 13:07:31 +00:00
Arch Librarian
20d118d57a 2005-05-21 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-05-21 09:14:47 GMT
2005-05-21  Tollef Fog Heen  <tfheen@err.no>

    * check/check-libs-private: New test to check for support for
    private libraries.

    * check/simple.pc (prefix): Add Libs.private header.

    * check/Makefile.am (TESTS): Add check-libs-private test

    * pkg.h: Adjust function prototypes.

    * pkg.c: Add global ignore_private_libs variable.
    (scan_dir): Use the correct free function.  Stop leaking file
    descriptors.
    (package_get_l_libs, packages_get_l_libs, package_get_L_libs,
    packages_get_L_libs): Stop the recursive silliness and go back to
    old behaviour.
    (packages_get_all_libs): Adjust parameters to packages_get_*_libs
    (enable_private_libs, disable_private_libs): Trivial helper
    functions.

    * pkg-config.1: Update documentation wrt search path (Debian
    #308942), update docs for Libs.private and add the problematic
    handling of mixing = and non-= arguments to the bugs section.

    * parse.h: Adjust parameters for parse_package_file to get private
    libs or not.

    * parse.c (trim_and_sub): Fix memory leak.
    (_do_parse_libs): New function including what's common between
    parse_libs and parse_private_libs.
    (parse_libs_private): New function.  Handle private libraries.
    (parse_line): Add . to the list of valid characters in headers (so
    Libs.private works correctly.
    (parse_line): Fix memory leaks.
    (parse_line): Handle Libs.private.
    (parse_package_file): Fix memory leak.

    * main.c (main): Fix memory leak.

    * NEWS: Document changes to inter-library handling.

    * main.c (main): Handle inter-library dependencies old-style, but
    do private libraries too.  Adjust parameters to
    packages_get_*_libs.

    * configure.in: Change comment wrt inter-library handling to talk
    about private libraries instead.
2005-07-14 13:07:18 +00:00
Arch Librarian
96d4dc19c7 2005-03-29 Tollef Fog Heen <tfheen@err.no>
Author: tfheen
Date: 2005-03-29 07:09:37 GMT
2005-03-29  Tollef Fog Heen  <tfheen@err.no>

        * check/check-cflags, check/check-define-variable,
        check/check-libs, check/common, check/Makefile.am,
        check/simple.pc:  Add simple test framework and begin writing
        tests.

        * Makefile.am, configure.in: Make in check/ as well.
2005-07-14 13:06:38 +00:00