From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Grennan Subject: [PATCH-w 104/105] t0040 (parse-options): modernize style Date: Wed, 29 Feb 2012 17:45:25 -0800 Message-ID: <1330566326-26075-10-git-send-email-tmgrennan@gmail.com> References: <1330566326-26075-1-git-send-email-tmgrennan@gmail.com> Cc: git@vger.kernel.org, Jeff King , Carlos Rica , Andy Parkins , "Shawn O. Pearce" , Amos Waterland , Johannes Schindelin To: Junio C Hamano X-From: git-owner@vger.kernel.org Thu Mar 01 02:46:22 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S2v64-00046e-KN for gcvg-git-2@plane.gmane.org; Thu, 01 Mar 2012 02:46:20 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030570Ab2CABqO (ORCPT ); Wed, 29 Feb 2012 20:46:14 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:52025 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030551Ab2CABqK (ORCPT ); Wed, 29 Feb 2012 20:46:10 -0500 Received: by mail-vw0-f46.google.com with SMTP id ff1so74765vbb.19 for ; Wed, 29 Feb 2012 17:46:09 -0800 (PST) Received-SPF: pass (google.com: domain of tmgrennan@gmail.com designates 10.52.20.142 as permitted sender) client-ip=10.52.20.142; Authentication-Results: mr.google.com; spf=pass (google.com: domain of tmgrennan@gmail.com designates 10.52.20.142 as permitted sender) smtp.mail=tmgrennan@gmail.com; dkim=pass header.i=tmgrennan@gmail.com Received: from mr.google.com ([10.52.20.142]) by 10.52.20.142 with SMTP id n14mr4146590vde.59.1330566369755 (num_hops = 1); Wed, 29 Feb 2012 17:46:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=RhZ78G+bZB9Kh0+ninG5zAOCVnhb4wyfW8+NZUcoA0w=; b=I04wMQ69HbmoVno37GXSHFbw4JW34P39ZO7R+YJZDOZIIBMVzIiO6AM1lTyfxUwxpD YWlbuicq0oE6z8uU6v2Yh9/rTNbyNhELuovQDnHhESmnLJzh0jNsZmROEq7JsP2bcJFp b3N/2JTO8TYXIwJKyAbSPpjq6XtU7Wq156i5Q= Received: by 10.52.20.142 with SMTP id n14mr3550807vde.59.1330566369701; Wed, 29 Feb 2012 17:46:09 -0800 (PST) Received: from tgrennan-laptop.lab.redback.com ([129.192.185.163]) by mx.google.com with ESMTPS id n14sm502335vdj.22.2012.02.29.17.46.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Feb 2012 17:46:08 -0800 (PST) X-Mailer: git-send-email 1.7.8 In-Reply-To: <1330566326-26075-1-git-send-email-tmgrennan@gmail.com> In-Reply-To: <20120223002215.GE2410@tgrennan-laptop> References: <20120223002215.GE2410@tgrennan-laptop> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: - Guard setup with test_expect_success - Single-quoted, tab prefaced test blocks of < 80 cols - Redirect unwanted output Signed-off-by: Tom Grennan --- t/t0040-parse-options.sh | 283 +++++++++++++++++++++------------------------- 1 files changed, 127 insertions(+), 156 deletions(-) diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index a1e4616..6416d77 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -5,55 +5,60 @@ test_description='our own option parser' -. ./test-lib.sh +if ! test -r test-lib.sh ; then + (cd ${0%/*} && ./${0##*/} $@) + exit $? +fi -cat > expect << EOF -usage: test-parse-options - - -b, --boolean get a boolean - -4, --or4 bitwise-or boolean with ...0100 - --neg-or4 same as --no-or4 - - -i, --integer get a integer - -j get a integer, too - --set23 set integer to 23 - -t