Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Simplify a bit more the regression test framework
Baptiste Daroussin committed 10 years ago
commit 75f9af629f871ba8de3af6f86c9a9f6c4da60ac6
parent df928cd
22 files changed +146 -249
modified tests/frontend/001sanity.sh
@@ -1,6 +1,13 @@
#!/usr/bin/env atf-sh

-
atf_test_case which
+
. $(atf_get_srcdir)/test_environment.sh
+
if [ `uname -s` != "Darwin" ]; then
+
	ldd=ldd
+
fi
+
tests_init \
+
	which \
+
	${ldd}
+

which_body() {
	atf_check \
	    -o inline:"$(atf_get_srcdir)/../../src/pkg\n" \
@@ -9,7 +16,7 @@ which_body() {
	    which pkg
}

-
atf_test_case ldd
+

ldd_body() {
	atf_check \
	    -o match:".*libpkg.so.3 => $(atf_get_srcdir).*$" \
@@ -17,12 +24,3 @@ ldd_body() {
	    -s exit:0 \
	    ldd -a $(atf_get_srcdir)/../../src/.libs/pkg
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case which
-
	if [ `uname -s` != "Darwin" ]; then
-
		atf_add_test_case ldd
-
	fi
-
}
modified tests/frontend/add.sh
@@ -1,5 +1,18 @@
#! /usr/bin/env atf-sh

+
. $(atf_get_srcdir)/test_environment.sh
+
tests_init	\
+
		add \
+
		add_automatic \
+
		add_noscript \
+
		add_noscript \
+
		add_force \
+
		add_accept_missing \
+
		add_quiet \
+
		add_stdin \
+
		add_stdin_missing \
+
		add_no_version
+

initialize_pkg() {
	touch a
	cat << EOF > test.ucl
@@ -35,7 +48,6 @@ EOF
		pkg create -M test.ucl
}

-
atf_test_case add
add_body() {
	initialize_pkg

@@ -56,7 +68,6 @@ post-install
		pkg query "%a" test
}

-
atf_test_case add_automatic
add_automatic_body() {
	initialize_pkg

@@ -77,10 +88,6 @@ post-install

}

-
atf_test_case add_noscript
-
add_noscript_head() {
-
	atf_set "descr" "pkg add -I"
-
}
add_noscript_body() {
	initialize_pkg

@@ -92,12 +99,12 @@ ${JAILED}Extracting test-1: done
		-e empty \
		pkg add -I test-1.txz
}
-
atf_test_case add_force
+

add_force_body() {
	initialize_pkg
}

-
atf_test_case add_accept_missing
+

add_accept_missing_body() {
	touch a
	cat << EOF > test.ucl
@@ -156,7 +163,6 @@ post-install
		pkg add -M test-1.txz
}

-
atf_test_case add_quiet
add_quiet_body() {
	initialize_pkg

@@ -166,7 +172,6 @@ add_quiet_body() {
		pkg add -q ./test-1.txz
}

-
atf_test_case add_stdin
add_stdin_body() {
	initialize_pkg

@@ -181,11 +186,6 @@ post-install
		pkg add -
}

-
atf_test_case add_stdin_missing
-
add_stdin_body_head() {
-
	atf_set "descr" "pkg add -M -"
-
}
-

add_stdin_missing_body() {
	touch a
	cat << EOF > test.ucl
@@ -244,7 +244,6 @@ post-install
		pkg add -M -
}

-
atf_test_case add_no_version
add_no_version_body() {
	cat << EOF > test.ucl
name: test
@@ -302,17 +301,3 @@ EOF
	atf_check -o ignore -s exit:0 \
		pkg add final-1.txz
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case add
-
	atf_add_test_case add_automatic
-
	atf_add_test_case add_noscript
-
	atf_add_test_case add_force
-
	atf_add_test_case add_accept_missing
-
	atf_add_test_case add_quiet
-
	atf_add_test_case add_stdin
-
	atf_add_test_case add_stdin_missing
-
	atf_add_test_case add_no_version
-
}
modified tests/frontend/alias.sh
@@ -1,6 +1,12 @@
#! /usr/bin/env atf-sh

-
atf_test_case alias
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	alias \
+
	alias_from_env \
+
	alias_from_conf
+

alias_body() {
	. $(atf_get_srcdir)/test_environment.sh

@@ -23,7 +29,6 @@ alias_body() {
		pkg -C "" alias nonexistent
}

-
atf_test_case alias_from_env
alias_from_env_body() {
	. $(atf_get_srcdir)/test_environment.sh
	export ALIAS="showaliases=alias -q,list=info -q"
@@ -56,7 +61,6 @@ list 'info -q'
		pkg -C "" alias nonexistent
}

-
atf_test_case alias_from_conf
alias_from_conf_body() {
	. $(atf_get_srcdir)/test_environment.sh
	unset ALIAS
@@ -95,11 +99,3 @@ list 'info -q'
		-s exit:69 \
		pkg -C config alias nonexistent
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case alias
-
	atf_add_test_case alias_from_env
-
	atf_add_test_case alias_from_conf
-
}
modified tests/frontend/annotate.sh
@@ -1,10 +1,9 @@
#! /usr/bin/env atf-sh

-
atf_test_case annotate
-
annotate_head() {
-
	atf_set "require.files" \
-
	   "${RESOURCEDIR}/png.ucl ${RESOURCEDIR}/sqlite3.ucl"
-
}
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	annotate

annotate_body() {
	for pkg in 'png' 'sqlite3' ; do
@@ -125,11 +124,3 @@ annotate_body() {
	    pkg annotate --all --show TEST1

}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	# Tests are run in alphabetical order
-
	atf_add_test_case annotate
-

-
}
modified tests/frontend/conflicts-multirepo.sh
@@ -1,5 +1,9 @@
#! /usr/bin/env atf-sh
-
atf_test_case conflicts_multirepo
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	conflicts_multirepo
+

conflicts_multirepo_head() {
	atf_set "timeout" "20"
}
@@ -173,9 +177,3 @@ ${JAILED}[2/2] Extracting test-1.1: done
		-s exit:0 \
		pkg -o CONSERVATIVE_UPGRADE=no -o REPOS_DIR="${TMPDIR}" -o PKG_CACHEDIR="${TMPDIR}" upgrade -y
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case conflicts_multirepo
-
}
modified tests/frontend/conflicts.sh
@@ -1,5 +1,10 @@
#! /usr/bin/env atf-sh
-
atf_test_case find_conflicts
+

+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	find_conflicts
+

find_conflicts_body() {
	touch a
	cat << EOF >> manifest
@@ -88,9 +93,3 @@ ${JAILED}[2/2] Extracting test2-1: done
		-s exit:0 \
		pkg -o REPOS_DIR="${TMPDIR}" -o PKG_CACHEDIR="${TMPDIR}" install -y test2-1
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case find_conflicts
-
}
modified tests/frontend/create.sh
@@ -1,5 +1,24 @@
#! /usr/bin/env atf-sh

+
. $(atf_get_srcdir)/test_environment.sh
+

+
if [ `uname -s` != "Linux" ] ; then
+
	nonlinux="create_from_plist_fflags create_from_plist_bad_fflags"
+
fi
+

+
tests_init \
+
	create_from_plist \
+
	create_from_plist_set_owner \
+
	create_from_plist_set_group \
+
	create_from_plist_gather_mode \
+
	create_from_plist_set_mode \
+
	create_from_plist_mini \
+
	create_from_plist_dirrm \
+
	create_from_plist_ignore \
+
	${nonlinux} \
+
	create_from_plist_with_keyword_arguments \
+
	create_from_manifest_and_plist
+

genmanifest() {
	cat << EOF >> +MANIFEST
name: test
@@ -35,7 +54,6 @@ basic_validation() {
	xz -t test-1.txz || atf_fail "XZ integrity check failed"
}

-
atf_test_case create_from_plist
create_from_plist_body() {
	touch file1
	genmanifest
@@ -55,7 +73,6 @@ create_from_plist_body() {
		tar tvf test-1.txz
}

-
atf_test_case create_from_plist_set_owner
create_from_plist_set_owner_body() {

	preparetestcredentials "(plop,,)"
@@ -74,11 +91,6 @@ create_from_plist_set_owner_body() {
		tar tvf test-1.txz
}

-
atf_test_case create_from_plist_set_group
-
create_from_plist_set_owner_head() {
-
	atf_set "descr" "Testing credentials set from the plist"
-
}
-

create_from_plist_set_group_body() {

	preparetestcredentials "(,bla,)"
@@ -97,11 +109,6 @@ create_from_plist_set_group_body() {
		tar tvf test-1.txz
}

-
atf_test_case create_from_plist_gather_mode
-
create_from_plist_gather_mode_head() {
-
	atf_set "descr" "Testing credentials set from the plist"
-
}
-

create_from_plist_gather_mode_body() {

	preparetestcredentials "(plop,bla,)"
@@ -122,10 +129,6 @@ create_from_plist_gather_mode_body() {
		tar tvf test-1.txz
}

-
atf_test_case create_from_plist_set_mode
-
create_from_plist_set_mode_head() {
-
	atf_set "descr" "Testing credentials set from the plist"
-
}
create_from_plist_set_mode_body() {

	preparetestcredentials "(,,2755)"
@@ -144,10 +147,6 @@ create_from_plist_set_mode_body() {
		tar tvf test-1.txz
}

-
atf_test_case create_from_plist_mini
-
create_from_plist_mini_head() {
-
	atf_set "descr" "Testing credentials set from the plist"
-
}
create_from_plist_mini_body() {

	preparetestcredentials "(plop,)"
@@ -166,11 +165,6 @@ create_from_plist_mini_body() {
		tar tvf test-1.txz
}

-
atf_test_case create_from_plist_dirrm
-
create_from_plist_dirrm_head() {
-
	atf_set "descr" "Testing @dirrm(try) set from the plist"
-
}
-

create_from_plist_dirrm_body() {
	mkdir testdir

@@ -193,10 +187,6 @@ create_from_plist_dirrm_body() {
	done
}

-
atf_test_case create_from_plist_ignore
-
create_from_plist_ignore_head() {
-
	atf_set "descr" "Testing @ignore"
-
}
create_from_plist_ignore_body() {
	genmanifest
	genplist "@ignore
@@ -220,11 +210,6 @@ aline"
		pkg -o DEVELOPER_MODE=yes create -o ${TMPDIR} -m . -p test.plist -r .
}

-
atf_test_case create_from_plist_fflags
-
create_from_plist_fflags_head() {
-
	atf_set "descr" "Test fflags set from plist"
-
}
-

create_from_plist_fflags_body() {
	preparetestcredentials "(,,,schg)"

@@ -235,11 +220,6 @@ create_from_plist_fflags_body() {
		pkg create -o ${TMPDIR} -m . -p test.plist -r .
}

-
atf_test_case create_from_plist_bad_fflags
-
create_from_plist_bad_fflags_head() {
-
	atf_set "descr" "Test bad fflags set from plist"
-
}
-

create_from_plist_bad_fflags_body() {
	preparetestcredentials "(,,,schg,bad)"

@@ -250,11 +230,6 @@ create_from_plist_bad_fflags_body() {
		pkg create -o ${TMPDIR} -m . -p test.plist -r .
}

-
atf_test_case create_from_plist_with_keyword_arguments
-
create_from_plist_with_keyword_arguments_head() {
-
	atf_set "descr" "Test keywords with arguments"
-
}
-

create_from_plist_with_keyword_arguments_body() {
	preparetestcredentials "testkeyword"

@@ -347,11 +322,6 @@ EOF
		pkg info -R --raw-format=ucl -F test-1.txz
}

-
atf_test_case create_from_manifest_and_plist
-
create_from_manifest_and_plist_head() {
-
	atf_set "descr" "Testing pkg create with manifest and plist"
-
}
-

create_from_manifest_and_plist_body() {
	genmanifest
	touch testfile
modified tests/frontend/delete.sh
@@ -1,6 +1,12 @@
#! /usr/bin/env atf-sh

-
atf_test_case simple_delete
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	simple_delete \
+
	simple_delete_prefix_ending_with_slash \
+
	delete_with_directory_owned
+

simple_delete_body() {
	touch file1
	mkdir dir
@@ -42,7 +48,6 @@ EOF
	test -d ${TMPDIR} || atf_fail "Prefix have been removed"
}

-
atf_test_case simple_delete_prefix_ending_with_slash
simple_delete_prefix_ending_with_slash_body() {
	touch file1
	mkdir dir
@@ -84,7 +89,6 @@ EOF
	test -d ${TMPDIR} || atf_fail "Prefix have been removed"
}

-
atf_test_case delete_with_directory_owned
delete_with_directory_owned_body() {
	touch file1
	mkdir dir
@@ -155,11 +159,3 @@ EOF
	test -d dir && atf_fail "'dir' still present"
	test -d ${TMPDIR} || atf_fail "Prefix has been removed"
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case simple_delete
-
	atf_add_test_case simple_delete_prefix_ending_with_slash
-
	atf_add_test_case delete_with_directory_owned
-
}
modified tests/frontend/lock.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case lock
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	lock
+

lock_head() {
	atf_set "require.files" \
	   "${RESOURCEDIR}/png.ucl ${RESOURCEDIR}/sqlite3.ucl"
@@ -79,10 +83,3 @@ lock_body() {
	    -s exit:0 \
	    pkg lock -l
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	# Tests are run in alphabetical order
-
	atf_add_test_case lock
-
}
modified tests/frontend/packagesplit.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case package_split
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	package_split
+

package_split_body() {
	touch file1
	touch file2
@@ -137,9 +141,3 @@ EOF

	test -f file1 || atf_fail "file1 is not present"
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case package_split
-
}
modified tests/frontend/php-pr.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case pkg_phpextensions
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	pkg_phpextensions
+

pkg_phpextensions_body() {
	touch php53.file
	touch php53extension.file
@@ -281,10 +285,3 @@ Installed packages to be REINSTALLED:
		-s exit:0 \
		pkg -o REPOS_DIR="${TMPDIR}" -o PKG_CACHEDIR="${TMPDIR}" upgrade -n
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case pkg_phpextensions
-
}
-

modified tests/frontend/pkg.sh
@@ -1,6 +1,13 @@
#! /usr/bin/env atf-sh

-
atf_test_case pkg_no_database
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	pkg_no_database \
+
	pkg_config_defaults \
+
	pkg_create_manifest_bad_syntax \
+
	pkg_repo_load_order
+

pkg_no_database_body() {
	atf_check \
	    -o empty \
@@ -9,7 +16,6 @@ pkg_no_database_body() {
	    -x PKG_DBDIR=/dev/null pkg -N
}

-
atf_test_case pkg_config_defaults
pkg_config_defaults_body()
{
	atf_check \
@@ -41,7 +47,6 @@ pkg_config_defaults_body()
	    env -i PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" pkg -C "" -R "" -vv
}

-
atf_test_case pkg_create_manifest_bad_syntax
pkg_create_manifest_bad_syntax_body()
{
	mkdir -p testpkg/.metadir
@@ -67,7 +72,6 @@ EOF
	    pkg create -q -m testpkg/.metadir -r testpkg
}

-
atf_test_case pkg_repo_load_order
pkg_repo_load_order_body()
{
	echo "03_repo: { url: file:///03_repo }" > plop.conf
@@ -81,12 +85,3 @@ pkg_repo_load_order_body()
	    -s exit:0 \
	    echo $out
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case pkg_no_database
-
	atf_add_test_case pkg_config_defaults
-
	atf_add_test_case pkg_create_manifest_bad_syntax
-
	atf_add_test_case pkg_repo_load_order
-
}
modified tests/frontend/pubkey.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case pubkey
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	pubkey
+

pubkey_body() {
	atf_check -o ignore -e ignore \
		openssl genrsa -out repo.key 2048
@@ -41,8 +45,3 @@ EOF
		pkg -o REPOS_DIR="${TMPDIR}" \
		-o ${PKG_CACHEDIR}="${TMPDIR}" update
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-
	atf_add_test_case pubkey
-
}
modified tests/frontend/query.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case query
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	query
+

query_body() {
	touch plop
	touch bla
@@ -60,9 +64,3 @@ EOF
		-s exit:0 \
		pkg query -e "%#O == 0" "%n"
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case query
-
}
modified tests/frontend/register.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case register_conflicts
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	register_conflicts
+

register_conflicts_body() {
	mkdir -p teststage/${TMPDIR}
	echo a > teststage/${TMPDIR}/plop
@@ -50,9 +54,3 @@ EOF
	nsum=$(openssl dgst -sha256 -binary plop | hexdump -v -e '/1 "%x"')
	atf_check_equal ${sum} ${nsum}
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case register_conflicts
-
}
modified tests/frontend/repo.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case repo
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	repo
+

repo_body() {
	touch plop
	touch bla
@@ -64,9 +68,3 @@ EOF
	atf_check_equal $nb 2

}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case repo
-
}
modified tests/frontend/requires.sh
@@ -1,6 +1,10 @@
#! /usr/bin/env atf-sh

-
atf_test_case requires
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	requires
+

requires_body() {
	cat << EOF >> repo.conf
local1: {
@@ -70,10 +74,3 @@ New packages to be INSTALLED:
	    -s exit:0 \
	    pkg -o REPOS_DIR="${TMPDIR}" install -n b
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case requires
-
}
-

modified tests/frontend/rootdir.sh
@@ -1,6 +1,10 @@
#!/usr/bin/env atf-sh

-
atf_test_case rootdir
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	rootdir
+

rootdir_body() {
	unset PKG_DBDIR

@@ -10,9 +14,3 @@ rootdir_body() {
		-s exit:0 \
		pkg -r "${TMPDIR}" config pkg_dbdir
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case rootdir
-
}
modified tests/frontend/rubypuppet.sh
@@ -3,8 +3,11 @@
# If you remove rubygem-ruby-augeas from puppet as deps pkg will not remove puppet
# but also don't reinstall it which is also wrong.

+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	pkg_puppet

-
atf_test_case pkg_puppet
pkg_puppet_body() {
	touch puppet.file
	touch ruby.file
@@ -353,9 +356,3 @@ Installed packages to be REINSTALLED:
	    -s exit:0 \
	    pkg -o REPOS_DIR="${TMPDIR}" -o PKG_CACHEDIR="${TMPDIR}" upgrade -yn
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case pkg_puppet
-
}
modified tests/frontend/search.sh
@@ -1,13 +1,11 @@
#! /usr/bin/env atf-sh

-
atf_test_case search
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	search
+

search_body() {
	export REPOS_DIR=/nonexistent
	atf_check -e inline:"No active remote repositories configured.\n" -o empty -s exit:3 pkg -C '' -R '' search -e -Q comment -S name pkg
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case search
-
}
modified tests/frontend/set.sh
@@ -1,5 +1,12 @@
#! /usr/bin/env atf-sh

+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	set_automatic \
+
	set_change_name \
+
	set_change_origin
+

initialize_pkg() {
	cat << EOF > test.ucl
name: test
@@ -23,7 +30,6 @@ EOF
		pkg register -t -M test.ucl
}

-
atf_test_case set_automatic
set_automatic_body() {
	initialize_pkg

@@ -58,7 +64,6 @@ set_automatic_body() {
		pkg query "%a" test
}

-
atf_test_case set_change_name
set_change_name_body() {
	initialize_pkg

@@ -75,7 +80,6 @@ set_change_name_body() {
		pkg info -q
}

-
atf_test_case set_change_origin
set_change_origin_body() {
	initialize_pkg

@@ -91,11 +95,3 @@ set_change_origin_body() {
		-s exit:0 \
		pkg info -qo
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case set_automatic
-
	atf_add_test_case set_change_name
-
	atf_add_test_case set_change_origin
-
}
modified tests/frontend/version.sh
@@ -1,15 +1,13 @@
#! /usr/bin/env atf-sh

-
atf_test_case version
+
. $(atf_get_srcdir)/test_environment.sh
+

+
tests_init \
+
	version
+

version_body() {
	atf_check -o inline:"<\n" -s exit:0 pkg version -t 1 2
	atf_check -o inline:">\n" -s exit:0 pkg version -t 2 1
	atf_check -o inline:"=\n" -s exit:0 pkg version -t 2 2
	atf_check -o inline:"<\n" -s exit:0 pkg version -t 2 1,1
}
-

-
atf_init_test_cases() {
-
	. $(atf_get_srcdir)/test_environment.sh
-

-
	atf_add_test_case version
-
}