From 0665d3f2e65b75db55134b5ad3fc1c8182b05f9e Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 13 Sep 2011 10:51:31 -0400 Subject: lowercase gpu string and recognizers in gpu_table_tester to match the behavior of the real code --- scripts/gpu_table_tester | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/gpu_table_tester b/scripts/gpu_table_tester index 2ad7ffc01e..4edf649994 100755 --- a/scripts/gpu_table_tester +++ b/scripts/gpu_table_tester @@ -126,8 +126,7 @@ while (<GPUS>) if ($errsOnLine == $ErrorsSeen) # no errors found on this line { - $lcregex = $regex; # the real gpu table parser lowercases each recognizer - push @InOrder,$lcregex; + push @InOrder,$regex; $NameLine{$name} = $INPUT_LINE_NUMBER; $RecognizerLine{$regex} = $INPUT_LINE_NUMBER; $Name{$regex} = $name; @@ -148,13 +147,13 @@ my %RecognizedBy; while (<>) # Loop over input lines { chomp; - my $lowerInput = $_; - lc lowerInput; # the real gpu table parser lowercases the input string + my $lcInput = lc $_; # the real gpu table parser lowercases the input string my $recognizer; $RecognizedBy{$_} = 'UNRECOGNIZED'; foreach $recognizer ( @InOrder ) # note early exit if recognized { - if ( m/$recognizer/ ) + my $lcRecognizer = lc $recognizer; # the real gpu table parser lowercases the recognizer + if ( $lcInput =~ m/$lcRecognizer/ ) { $RecognizedBy{$_} = $recognizer; last; # exit recognizer loop -- cgit v1.2.3