aboutsummaryrefslogtreecommitdiff
blob: d6944838d3b3cf03700180685fee0818d97ce187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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_uses() {
	equery uses gcc > ${tmpfile}

	x=$(grep "static" ${tmpfile} | wc -l)
	
	assert_eq ${FUNCNAME} ${x} 1
	
	x=$(cat ${tmpfile} | wc -l)
	assert_ge ${FUNCNAME} $x 7
}

test_uses_all() {
	equery uses -a uclibc > ${tmpfile}

	x=$(grep "static" ${tmpfile} | wc -l)
	assert_ge ${FUNCNAME} ${x} 1
	
	x=$(cat ${tmpfile} | wc -l)
	assert_ge ${FUNCNAME} $x 5
	
}

# Run tests

test_uses
test_uses_all

rm -f ${tmpfile}