[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] auto generated regression tests

From: Gunnar Farneback
Subject: Re: [gnugo-devel] auto generated regression tests
Date: Thu, 08 Aug 2002 22:57:18 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Dan wrote:
> A very easy fix would be to have dragon_status NOT output these
> coordinates when called with no parameter.
> The old dragon_status would not accept a call with no parameter
> so there would be no functionality lost here.

Easy yes, but does it really make sense to give different information
when called for one vertex or for all?

The following patch probably fixes the matcher_check script. Thanks
goes to google for finding me a page with sufficient perl basics.


Index: interface/gtp_examples/matcher_check
RCS file: /cvsroot/gnugo/gnugo/interface/gtp_examples/matcher_check,v
retrieving revision 1.4
diff -u -r1.4 matcher_check
--- interface/gtp_examples/matcher_check        8 Aug 2002 19:21:37 -0000       
+++ interface/gtp_examples/matcher_check        8 Aug 2002 20:53:52 -0000
@@ -371,10 +371,10 @@
         #print "parsing a line\n";
         if ($line eq "\n") {last;}     #stop at end of response
-        $line =~ s/=//g;       #zap the = at the fron of the response
+        $line =~ s/= //g;      #zap the = at the front of the response
        $line =~ s/\n//g;       #zap newlines...
-       $line =~ s/\s//g;       #zap whitespace
-       my ($vertex, $new_status) = split(":", $line);
+       my ($vertex, $new_status) = split(": ", $line);
+       $new_status =~ s/ .+//; #zap everything after the status
        my $old_status;
        $old_status = $match_hist{$vertex} if (exists($match_hist{$vertex}));

reply via email to

[Prev in Thread] Current Thread [Next in Thread]