From: Rob Pike Date: Tue, 18 Nov 2008 22:17:13 +0000 (-0800) Subject: allow files to be named on the command line X-Git-Tag: weekly.2009-11-06~2694 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8b8630c6cf95c44d59e415069e40c8845b6627c5;p=gostls13.git allow files to be named on the command line R=rsc DELTA=3 (1 added, 1 deleted, 1 changed) OCL=19485 CL=19485 --- diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest index cc0b997749..7d292a9b14 100755 --- a/src/cmd/gotest/gotest +++ b/src/cmd/gotest/gotest @@ -6,13 +6,13 @@ # Using all the test*.go files in the current directory, write out a file # _testmain.go that runs all its tests. Compile everything and run the # tests. +# If files are named on the command line, use them instead of test*.go. set -e -gofiles=$(echo test*.go) +gofiles=${*:-$(echo test*.go)} ofiles=$(echo $gofiles | sed 's/\.go/.6/g') files=$(echo $gofiles | sed 's/\.go//g') -echo $ofiles for i in $gofiles do