diff options
Diffstat (limited to 'scripts/test_errors.pl')
-rwxr-xr-x | scripts/test_errors.pl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/test_errors.pl b/scripts/test_errors.pl new file mode 100755 index 00000000..76173b82 --- /dev/null +++ b/scripts/test_errors.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +my $file; +while ($file = shift @ARGV) { + # print "Processing file $file...\n"; + open(IN, "$file") || die "Unable to open file $file"; + $state = ""; + $line=0; + while(<IN>) { + $line++; + chomp; + + if($state eq "") { + if(/xmlSecError\((.*)/) { + $state = "$file,$line," . $1; + } + } else { + if(/(.*);/) { + $_ = $state . $1; + $state = ""; + + while(/\t/) { + s/\t//; + } + while(/\, /) { + s/\, /\,/; + } + while(/\,/) { + s/\,/\;/; + } + print "$_\n"; + } else { + $state = $state . $_; + } + } + } + close IN; +} |