diff options
Diffstat (limited to 'src/equery/tests/test-belongs.sh')
-rwxr-xr-x | src/equery/tests/test-belongs.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/equery/tests/test-belongs.sh b/src/equery/tests/test-belongs.sh new file mode 100755 index 0000000..bd0eac4 --- /dev/null +++ b/src/equery/tests/test-belongs.sh @@ -0,0 +1,24 @@ +#! /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_belongs() { + equery belongs $(which gcc) > ${tmpfile} + + x=$(grep "gcc-config" ${tmpfile} | wc -l) + + assert_eq ${FUNCNAME} ${x} 1 +} + +# Run tests + +test_belongs + +rm -f ${tmpfile}
\ No newline at end of file |