pkgconf/tests/basic.toml

137 lines
3.2 KiB
TOML
Raw Permalink Normal View History

[noargs]
2023-06-08 23:10:16 +00:00
exitcode = 1
[libs]
stdout = "-L/test/lib -lfoo\n"
args = ["--libs", "foo"]
[libs.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags]
stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n"
args = ["--cflags", "--libs", "foo"]
[lib_cflags.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags_version]
stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n"
args = ["--cflags", "--libs", "foo > 1.2"]
[lib_cflags_version.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags_version_multiple]
stdout = "-fPIC -I/test/include/foo -L/test/lib -lbar -lfoo\n"
args = ["--cflags", "--libs", "foo > 1.2 bar >= 1.3"]
[lib_cflags_version_multiple.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags_version_multiple_comma]
stdout = "-fPIC -I/test/include/foo -L/test/lib -lbar -lfoo\n"
args = ["--cflags", "--libs", "foo > 1.2,bar >= 1.3"]
[lib_cflags_version_multiple_comma.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags_version_alt]
stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n"
args = ["--cflags", "--libs", "foo", ">", "1.2"]
[lib_cflags_version_alt.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags_version_different]
stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n"
args = ["--cflags", "--libs", "foo", "!=", "1.3"]
[lib_cflags_version_different.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[lib_cflags_version_different_bad]
exitcode = 1
stderr = "Package dependency requirement 'foo != 1.2.3' could not be satisfied.\nPackage 'foo' has version '1.2.3', required version is '!= 1.2.3'\n"
args = ["--cflags", "--libs", "foo", "!=", "1.2.3"]
[lib_cflags_version_different_bad.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists_nonexistent]
exitcode = 1
args = ["--exists", "nonexistant"]
[exists_nonexistent.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[nonexistent]
exitcode = 1
args = ["nonexistant"]
2023-06-08 23:25:37 +00:00
[nonexistent.env]
2023-06-08 23:10:16 +00:00
PKG_CONFIG_PATH="{test_root}/lib1"
[exists_version]
args = ["--exists", "foo > 1.2"]
[exists_version.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists_version_alt]
args = ["--exists", "foo", ">", "1.2"]
[exists_version_alt.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists_version_bad]
exitcode = 1
args = ["--exists", "foo > 1.2.3"]
[exists_version_bad.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[uninstalled_bad]
exitcode = 1
args = ["--uninstalled", "foo"]
[uninstalled_bad.env]
2023-06-08 23:25:37 +00:00
PKG_CONFIG_PATH="{test_root}/lib1"
[uninstalled]
args = ["--uninstalled", "omg"]
[uninstalled.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists_version_bad2]
exitcode = 1
args = ["--exists", "foo >= "]
[exists_version_bad2.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists_version_bad3]
exitcode = 1
args = ["--exists", "tilde >= 1.0.0"]
[exists_version_bad3.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists]
args = ["--exists", "tilde >= 1.0.0"]
[exists.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists2]
args = ["--exists", "tilde >= 1.0.0~rc1"]
[exists2.env]
PKG_CONFIG_PATH="{test_root}/lib1"
[exists3]
args = ["--exists", "", "foo"]
[exists3.env]
2023-06-08 23:10:16 +00:00
PKG_CONFIG_PATH="{test_root}/lib1"