diff options
author | fuzzyray <fuzzyray@gentoo.org> | 2008-08-27 21:19:40 +0000 |
---|---|---|
committer | fuzzyray <fuzzyray@gentoo.org> | 2008-08-27 21:19:40 +0000 |
commit | ba72586710a700ed76f35d365c645d5108bc5895 (patch) | |
tree | c16903693f2030c7b01b346b29b265dc1a473888 /src/equery/tests/test-check.sh | |
parent | Fix has_key() deprecation message. (Bug #232797) (diff) | |
download | gentoolkit-ba72586710a700ed76f35d365c645d5108bc5895.tar.gz gentoolkit-ba72586710a700ed76f35d365c645d5108bc5895.tar.bz2 gentoolkit-ba72586710a700ed76f35d365c645d5108bc5895.zip |
Create the gentoolkit-0.2.4 branch to coincide with the release of gentoolkit-0.2.4
svn path=/branches/gentoolkit-0.2.4/; revision=510
Diffstat (limited to 'src/equery/tests/test-check.sh')
-rwxr-xr-x | src/equery/tests/test-check.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/equery/tests/test-check.sh b/src/equery/tests/test-check.sh new file mode 100755 index 0000000..803299f --- /dev/null +++ b/src/equery/tests/test-check.sh @@ -0,0 +1,39 @@ +#! /bin/bash +# +# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> +# Copyright (c) 2004, Gentoo Foundation +# +# Licensed under the GNU General Public License, v2 + +. common-functions.sh + +tmpfile=$(tempfilename) + +test_check() { + equery check gcc > ${tmpfile} + + x=$(grep "sys-devel/gcc" ${tmpfile} | wc -l) + + assert_ge ${FUNCNAME} ${x} 1 + + x=$(egrep "[0-9]+ out of [0-9]+" ${tmpfile} | wc -l) + assert_ge ${FUNCNAME} ${x} 1 +} + +test_check_permissions() { + equery check sudo > ${tmpfile} + + x=$(grep "app-admin/sudo" ${tmpfile} | wc -l) + + assert_ge ${FUNCNAME} ${x} 1 + + x=$(egrep "[0-9]+ out of [0-9]+" ${tmpfile} | wc -l) + assert_ge ${FUNCNAME} ${x} 1 +} + +# Run tests + +test_check +test_check_permissions + +rm -f ${tmpfile} |