mirror of
https://github.com/pkgconf/pkgconf.git
synced 2026-01-26 08:07:53 +00:00
tests: port version option tests out of kyua
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
e574c85325
commit
ba33d22032
@ -72,6 +72,12 @@ EXTRA_DIST = pkg.m4 \
|
||||
t/basic/variable-env.test \
|
||||
t/basic/variable-no-recursion.test \
|
||||
t/basic/variable.test \
|
||||
t/basic/version-atleast-1.test \
|
||||
t/basic/version-atleast-2.test \
|
||||
t/basic/version-exact-1.test \
|
||||
t/basic/version-exact-2.test \
|
||||
t/basic/version-max-1.test \
|
||||
t/basic/version-max-2.test \
|
||||
t/ordering/cflags-never-mergeback.test \
|
||||
t/ordering/cflags-only.test \
|
||||
t/ordering/flag-order-1.test \
|
||||
@ -326,8 +332,7 @@ test_scripts= \
|
||||
tests/regress.sh \
|
||||
tests/requires.sh \
|
||||
tests/spdxtool.sh \
|
||||
tests/symlink.sh \
|
||||
tests/version.sh
|
||||
tests/symlink.sh
|
||||
|
||||
test_sh = $(test_scripts)
|
||||
check_SCRIPTS = ${test_sh:.sh=}
|
||||
|
||||
5
t/basic/version-atleast-1.test
Normal file
5
t/basic/version-atleast-1.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
AtLeastVersion: 1.0
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 0
|
||||
5
t/basic/version-atleast-2.test
Normal file
5
t/basic/version-atleast-2.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
AtLeastVersion: 2.0
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 1
|
||||
5
t/basic/version-exact-1.test
Normal file
5
t/basic/version-exact-1.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
ExactVersion: 1.0
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 1
|
||||
5
t/basic/version-exact-2.test
Normal file
5
t/basic/version-exact-2.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
ExactVersion: 1.2.3
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 0
|
||||
5
t/basic/version-max-1.test
Normal file
5
t/basic/version-max-1.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
MaxVersion: 1.0
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 1
|
||||
5
t/basic/version-max-2.test
Normal file
5
t/basic/version-max-2.test
Normal file
@ -0,0 +1,5 @@
|
||||
PackageSearchPath: lib1
|
||||
Query: foo
|
||||
MaxVersion: 2.0
|
||||
WantedFlags: exists
|
||||
ExpectedExitCode: 0
|
||||
@ -5,7 +5,6 @@ test_suite('pkgconf')
|
||||
atf_test_program{name='requires'}
|
||||
atf_test_program{name='regress'}
|
||||
atf_test_program{name='parser'}
|
||||
atf_test_program{name='version'}
|
||||
atf_test_program{name='personality'}
|
||||
atf_test_program{name='spdxtool'}
|
||||
atf_test_program{name='symlink'}
|
||||
|
||||
@ -9,7 +9,6 @@ tests = [
|
||||
'requires',
|
||||
'spdxtool',
|
||||
'symlink',
|
||||
'version',
|
||||
]
|
||||
|
||||
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env atf-sh
|
||||
|
||||
. $(atf_get_srcdir)/test_env.sh
|
||||
|
||||
tests_init \
|
||||
atleast \
|
||||
exact \
|
||||
max
|
||||
|
||||
atleast_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
pkgconf --atleast-version 1.0 foo
|
||||
atf_check \
|
||||
-s exit:1 \
|
||||
pkgconf --atleast-version 2.0 foo
|
||||
}
|
||||
|
||||
exact_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-s exit:1 \
|
||||
pkgconf --exact-version 1.0 foo
|
||||
atf_check \
|
||||
pkgconf --exact-version 1.2.3 foo
|
||||
}
|
||||
|
||||
max_body()
|
||||
{
|
||||
export PKG_CONFIG_PATH="${selfdir}/lib1"
|
||||
atf_check \
|
||||
-s exit:1 \
|
||||
pkgconf --max-version 1.0 foo
|
||||
atf_check \
|
||||
pkgconf --max-version 2.0 foo
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user