forked from ariadne/pkgconf
tests: add regression tests for --modversion
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
parent
eaa4bb44a0
commit
9cddd22bbc
|
@ -0,0 +1,12 @@
|
|||
prefix=/test
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: foobar
|
||||
Description: A testing pkg-config file
|
||||
Version: 3.2.1
|
||||
Libs: -L${libdir} -lfoobar
|
||||
Cflags: -fPIC -I${includedir}/foobar
|
||||
Cflags.private: -DFOOBAR_STATIC
|
||||
License: ISC
|
|
@ -0,0 +1,11 @@
|
|||
prefix=/test
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: unavailable_provider
|
||||
Description: Provides an otherwise unavailable package
|
||||
Version: 1.2.3
|
||||
Provides: unavailable = 1.2.3
|
||||
Libs: -lunavailable
|
||||
Cflags:
|
|
@ -23,6 +23,9 @@ tests_init \
|
|||
idirafter_munge_order \
|
||||
idirafter_munge_sysroot \
|
||||
idirafter_ordering \
|
||||
modversion_common_prefix \
|
||||
modversion_fullpath \
|
||||
modversion_provides \
|
||||
modversion_uninstalled \
|
||||
pcpath \
|
||||
virtual_variable \
|
||||
|
@ -275,6 +278,24 @@ billion_laughs_body()
|
|||
pkgconf --with-path="${selfdir}/lib1" --validate billion-laughs
|
||||
}
|
||||
|
||||
modversion_common_prefix_body()
|
||||
{
|
||||
atf_check -o inline:"foo: 1.2.3\nfoobar: 3.2.1\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion --verbose foo foobar
|
||||
}
|
||||
|
||||
modversion_fullpath_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --modversion "${selfdir}/lib1/foo.pc"
|
||||
}
|
||||
|
||||
modversion_provides_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion unavailable
|
||||
}
|
||||
|
||||
modversion_uninstalled_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
|
|
Loading…
Reference in New Issue