From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C678A1391DB for ; Sat, 15 Mar 2014 06:09:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE4E4E0AD5; Sat, 15 Mar 2014 06:09:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3F744E0AD5 for ; Sat, 15 Mar 2014 06:09:06 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 38C5033FB0A for ; Sat, 15 Mar 2014 06:09:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id F3E2818875 for ; Sat, 15 Mar 2014 06:09:02 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1394863735.243c6187e605b92cd55db830582cc6a766c912dc.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: tests/qdepends/ X-VCS-Repository: proj/portage-utils X-VCS-Files: tests/qdepends/dotest X-VCS-Directories: tests/qdepends/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 243c6187e605b92cd55db830582cc6a766c912dc X-VCS-Branch: master Date: Sat, 15 Mar 2014 06:09:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 704231c7-b582-48cf-bf7c-b89e407bf8c4 X-Archives-Hash: 33cf5c28a58e7abd9e9f24f6dbbb51cd commit: 243c6187e605b92cd55db830582cc6a766c912dc Author: Mike Frysinger gentoo org> AuthorDate: Sat Mar 15 06:08:55 2014 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sat Mar 15 06:08:55 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage-utils.git;a=commit;h=243c6187 tests: qdepends: add a -Q test --- tests/qdepends/dotest | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/qdepends/dotest b/tests/qdepends/dotest index d723228..49d5950 100755 --- a/tests/qdepends/dotest +++ b/tests/qdepends/dotest @@ -7,8 +7,8 @@ set -e mktmpdir test() { - local num=$1 dep=$2 exp=${3:-0} ret - local cmd=( qdepends -f "${dep}" ) + local num=$1 exp=$2 ret + local cmd=( qdepends "${@:3}" ) "${cmd[@]}" >& list && ret=0 || ret=$? if [[ ${ret} -ne ${exp} ]] ; then @@ -26,18 +26,25 @@ test() { tend $? "${cmd[*]}" } +testf() { test "$1" "${3:-0}" -f "$2"; } + # basic sanity checks -test 00 '|' 1 -test 01 '' -test 02 'a/b' -test 03 'foo? ( a/b )' -test 04 '|| ( a/b )' +testf 00 '|' 1 +testf 01 '' +testf 02 'a/b' +testf 03 'foo? ( a/b )' +testf 04 '|| ( a/b )' # a bit more complicated with or deps -test 05 '|| ( || ( || ( x ) a ) )' +testf 05 '|| ( || ( || ( x ) a ) )' # hande use deps on atoms #470180 -test 06 'a[foo(+)]' +testf 06 'a[foo(+)]' + +testQ() { test "$1" "${3:-0}" -Q "$2"; } + +# reverse checks #504636 +testQ 07 xinit cleantmpdir