diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2009-05-05 17:39:24 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2009-05-05 17:39:24 +0000 |
| commit | c819d146be6bce86d97019494173253e71b85d2f (patch) | |
| tree | 200d00c2b9a420540ff9c4e0d8b3080b762fb562 /trunk/src/equery/tests/common-functions.sh | |
| parent | 61823fe68081c6f8edf24455bbb34123598c5bb4 (diff) | |
| download | gentoolkit-c819d146be6bce86d97019494173253e71b85d2f.tar.gz | |
Rearrange trunk to support gentoolkit version 0.3. Split into gentoolkit, gentoolkit-dev, and deprecated. Import djanderson's work on the gentoolkit library and equery
svn path=/trunk/gentoolkit/; revision=589
Diffstat (limited to 'trunk/src/equery/tests/common-functions.sh')
| -rw-r--r-- | trunk/src/equery/tests/common-functions.sh | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/trunk/src/equery/tests/common-functions.sh b/trunk/src/equery/tests/common-functions.sh deleted file mode 100644 index f065a0a..0000000 --- a/trunk/src/equery/tests/common-functions.sh +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/bash -# -# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> -# Copyright (c) 2004, Gentoo Foundation -# -# Licensed under the GNU General Public License, v2 - -function tempfilename() { - fn=$(date "+%s") - if [ ! -f ${fn}.tmp ] ; then - echo ${fn}.tmp - fi -} - -function report_pass() { - printf "%-40s - passed\n" ${1} -} - -function report_failure() { - printf "%-40s - FAILED!\n" ${1} -} - -function assert_samefile() { - diff $2 $3 && report_pass $1 || report_failure $1 -} - -function assert_eq() { - if [ $2 -eq $3 ] ; then - report_pass $1 - else - printf "FAIL: $2 ! -eq $3\n" - report_failure $1 - fi -} - -function assert_ge() { - if [ $2 -ge $3 ] ; then - report_pass $1 - else - printf "FAIL: $2 ! -ge $3\n" - report_failure $1 - fi -} - -function assert_exists() { - if [ -f $2 ] ; then - report_pass $1 - else - printf "FAIL: $2 does not exist\n" - report_failure $1 - fi -}
\ No newline at end of file |
