mirror of
https://github.com/pkgconf/pkgconf.git
synced 2026-01-27 01:44:34 +00:00
tests: move more regression tests out of kyua
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
222c5b5153
commit
20145bcfc1
13
Makefile.am
13
Makefile.am
@ -23,9 +23,13 @@ EXTRA_DIST = pkg.m4 \
|
||||
libpkgconf/meson.build \
|
||||
libpkgconf/config.h.meson \
|
||||
libpkgconf/win-dirent.h \
|
||||
t/basic/noargs.test \
|
||||
t/basic/arbitrary-path.test \
|
||||
t/basic/builtin-pkg-config-exists.test \
|
||||
t/basic/builtin-pkg-config-pc_path-variable.test \
|
||||
t/basic/builtin-pkgconf-exists.test \
|
||||
t/basic/builtin-pkgconf-pc_path-variable.test \
|
||||
t/basic/define-prefix.test \
|
||||
t/basic/direct-query-with-pkg_config_path.test \
|
||||
t/basic/env-tuple.test \
|
||||
t/basic/exists-cflags-env.test \
|
||||
t/basic/exists-cflags.test \
|
||||
@ -36,6 +40,8 @@ EXTRA_DIST = pkg.m4 \
|
||||
t/basic/exists-version-malformed.test \
|
||||
t/basic/exists-version-minimum.test \
|
||||
t/basic/exists-version-with-tilde.test \
|
||||
t/basic/incomplete-cflags.test \
|
||||
t/basic/incomplete-libs.test \
|
||||
t/basic/libs.test \
|
||||
t/basic/libs-cflags.test \
|
||||
t/basic/libs-cflags-version.test \
|
||||
@ -45,7 +51,10 @@ EXTRA_DIST = pkg.m4 \
|
||||
t/basic/libs-cflags-version-not-provided.test \
|
||||
t/basic/libs-env.test \
|
||||
t/basic/malformed-empty-package.test \
|
||||
t/basic/modversion-fullpath.test \
|
||||
t/basic/modversion-noflatten.test \
|
||||
t/basic/modversion-uninstalled.test \
|
||||
t/basic/noargs.test \
|
||||
t/basic/nocflags.test \
|
||||
t/basic/nolibs.test \
|
||||
t/basic/pkg-config-path.test \
|
||||
@ -56,6 +65,7 @@ EXTRA_DIST = pkg.m4 \
|
||||
t/basic/uninstalled.test \
|
||||
t/basic/variable-env.test \
|
||||
t/basic/variable-no-recursion.test \
|
||||
t/basic/variable.test \
|
||||
t/ordering/fragment-collision.test \
|
||||
t/ordering/framework-1.test \
|
||||
t/ordering/framework-2.test \
|
||||
@ -69,6 +79,7 @@ EXTRA_DIST = pkg.m4 \
|
||||
t/solver/libs-intermediary.test \
|
||||
t/solver/libs-metapackage.test \
|
||||
t/solver/libs-static-ordering.test \
|
||||
t/solver/modversion-provides.test \
|
||||
t/solver/provides-bar-any.test \
|
||||
t/solver/provides-bar-versioned-equal.test \
|
||||
t/solver/provides-bar-versioned-greater-than-equal.test \
|
||||
|
||||
3
t/basic/builtin-pkg-config-exists.test
Normal file
3
t/basic/builtin-pkg-config-exists.test
Normal file
@ -0,0 +1,3 @@
|
||||
Query: pkgconf
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 0
|
||||
5
t/basic/builtin-pkg-config-pc_path-variable.test
Normal file
5
t/basic/builtin-pkg-config-pc_path-variable.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: pkg-config
|
||||
WantVariable: pc_path
|
||||
ExpectedExitCode: 0
|
||||
ExpectedStdout: %TEST_FIXTURES_DIR%/lib1
|
||||
3
t/basic/builtin-pkgconf-exists.test
Normal file
3
t/basic/builtin-pkgconf-exists.test
Normal file
@ -0,0 +1,3 @@
|
||||
Query: pkgconf
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 0
|
||||
5
t/basic/builtin-pkgconf-pc_path-variable.test
Normal file
5
t/basic/builtin-pkgconf-pc_path-variable.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: pkgconf
|
||||
WantVariable: pc_path
|
||||
ExpectedExitCode: 0
|
||||
ExpectedStdout: %TEST_FIXTURES_DIR%/lib1
|
||||
4
t/basic/direct-query-with-pkg_config_path.test
Normal file
4
t/basic/direct-query-with-pkg_config_path.test
Normal file
@ -0,0 +1,4 @@
|
||||
Environment: PKG_CONFIG_PATH=%TEST_FIXTURES_DIR%/lib2
|
||||
Query: %TEST_FIXTURES_DIR%/lib3/bar.pc
|
||||
WantedFlags: cflags
|
||||
ExpectedStdout: -fPIC -I/test/include/foo
|
||||
4
t/basic/incomplete-cflags.test
Normal file
4
t/basic/incomplete-cflags.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: incomplete
|
||||
WantedFlags: cflags
|
||||
ExpectedStdout:
|
||||
4
t/basic/incomplete-libs.test
Normal file
4
t/basic/incomplete-libs.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: incomplete
|
||||
WantedFlags: libs
|
||||
ExpectedStdout:
|
||||
3
t/basic/modversion-fullpath.test
Normal file
3
t/basic/modversion-fullpath.test
Normal file
@ -0,0 +1,3 @@
|
||||
WantedFlags: modversion
|
||||
Query: %TEST_FIXTURES_DIR%/lib1/bar.pc
|
||||
ExpectedStdout: 1.3
|
||||
4
t/basic/modversion-uninstalled.test
Normal file
4
t/basic/modversion-uninstalled.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: modversion
|
||||
Query: omg
|
||||
ExpectedStdout: 1.2.3
|
||||
4
t/basic/variable.test
Normal file
4
t/basic/variable.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
WantVariable: includedir
|
||||
ExpectedStdout: /test/include
|
||||
4
t/solver/modversion-provides.test
Normal file
4
t/solver/modversion-provides.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: modversion
|
||||
Query: unavailable
|
||||
ExpectedStdout: 1.2.3
|
||||
@ -10,29 +10,20 @@ tests_init \
|
||||
define_variable \
|
||||
define_variable_override \
|
||||
duplicate_tuple_upsert \
|
||||
variable \
|
||||
keep_system_libs \
|
||||
libs \
|
||||
libs_only \
|
||||
libs_never_mergeback \
|
||||
cflags_only \
|
||||
cflags_never_mergeback \
|
||||
incomplete_libs \
|
||||
incomplete_cflags \
|
||||
isystem_munge_sysroot \
|
||||
idirafter_munge_sysroot \
|
||||
modversion_common_prefix \
|
||||
modversion_fullpath \
|
||||
modversion_provides \
|
||||
modversion_uninstalled \
|
||||
modversion_one_word_expression \
|
||||
modversion_two_word_expression \
|
||||
modversion_three_word_expression \
|
||||
modversion_one_word_expression_no_space \
|
||||
modversion_one_word_expression_no_space_zero \
|
||||
pcpath \
|
||||
virtual_variable \
|
||||
fragment_collision \
|
||||
malformed_1 \
|
||||
malformed_quoting \
|
||||
explicit_sysroot \
|
||||
@ -96,14 +87,6 @@ duplicate_tuple_upsert_body()
|
||||
pkgconf --variable=prefix --with-path=${selfdir}/lib1 duplicate-tuple
|
||||
}
|
||||
|
||||
variable_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-o inline:"/test/include\n" \
|
||||
pkgconf --variable=includedir foo
|
||||
}
|
||||
|
||||
keep_system_libs_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
@ -160,22 +143,6 @@ cflags_never_mergeback_body()
|
||||
pkgconf --cflags prefix-foo1 prefix-foo2
|
||||
}
|
||||
|
||||
incomplete_libs_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-o inline:"\n" \
|
||||
pkgconf --libs incomplete
|
||||
}
|
||||
|
||||
incomplete_cflags_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-o inline:"\n" \
|
||||
pkgconf --cflags incomplete
|
||||
}
|
||||
|
||||
isystem_munge_sysroot_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="${selfdir}"
|
||||
@ -192,14 +159,6 @@ idirafter_munge_sysroot_body()
|
||||
pkgconf --cflags idirafter
|
||||
}
|
||||
|
||||
pcpath_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib2"
|
||||
atf_check \
|
||||
-o inline:"-fPIC -I/test/include/foo\n" \
|
||||
pkgconf --cflags ${selfdir}/lib3/bar.pc
|
||||
}
|
||||
|
||||
sysroot_munge_body()
|
||||
{
|
||||
sed "s|/sysroot/|${selfdir}/|g" ${selfdir}/lib1/sysroot-dir.pc > ${selfdir}/lib1/sysroot-dir-selfdir.pc
|
||||
@ -209,25 +168,6 @@ sysroot_munge_body()
|
||||
pkgconf --libs sysroot-dir-selfdir
|
||||
}
|
||||
|
||||
virtual_variable_body()
|
||||
{
|
||||
atf_check -s exit:0 \
|
||||
pkgconf --exists pkg-config
|
||||
atf_check -s exit:0 \
|
||||
pkgconf --exists pkgconf
|
||||
|
||||
atf_check -o inline:"${pcpath}\n" \
|
||||
pkgconf --variable=pc_path pkg-config
|
||||
atf_check -o inline:"${pcpath}\n" \
|
||||
pkgconf --variable=pc_path pkgconf
|
||||
}
|
||||
|
||||
fragment_collision_body()
|
||||
{
|
||||
atf_check -o inline:"-D_BAZ -D_BAR -D_FOO -D_THREAD_SAFE -pthread\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --cflags fragment-collision
|
||||
}
|
||||
|
||||
malformed_1_body()
|
||||
{
|
||||
atf_check -s exit:1 -o ignore \
|
||||
@ -271,24 +211,6 @@ modversion_common_prefix_body()
|
||||
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" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion omg
|
||||
}
|
||||
|
||||
modversion_one_word_expression_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user