From: Shawn O. Pearce Date: Sat, 02 Jan 2010 21:41:07 GMT Subject: Re: [PATCH v3 3/3] Smart-http tests: Test http-backend without curl or a webserver Message-ID: <20100102214107.GO6914@spearce.org> In-Reply-To: <905315641001021337v238515c8s34d820236dac698d@mail.gmail.com> Tarmigan wrote: > On Sat, Jan 2, 2010 at 1:03 PM, Shawn O. Pearce wrote: > > Tarmigan Casebolt wrote: > >> ?GET() { > >> - ? ? return 0 > >> + ? ? REQUEST_METHOD="GET" \ > >> + ? ? run_backend "/repo.git/$1" && > >> + ? ? grep "Status" act.out >act > >> + ? ? if [ $? -eq 1 ]; > > > > I think this should be spelled as: > > > > ? ? ? ?if ! grep "Status" act.out >act; then > > ? ? ? ? ? ? ? ?printf "Status: 200 OK\r\n" > act > > ? ? ? ?fi > > OK. I had figured the "1" would mean "no matches not found" rather > than some other error like "file does not exist". Not sure how > portable that error value convention is for greps though, so I've > changed it as you suggested. Your v3 series still shows it the old way... -- Shawn.