summaryrefslogtreecommitdiff
path: root/scripts/test_errors.pl
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-13 12:30:55 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-13 12:30:55 -0800
commitf251dedaa31b48f7c05a4b53c112b40ebca890ef (patch)
treed6c78a1b273417506edb030c96772c8459f5831e /scripts/test_errors.pl
downloadxmlsec1-f251dedaa31b48f7c05a4b53c112b40ebca890ef.tar.gz
xmlsec1-f251dedaa31b48f7c05a4b53c112b40ebca890ef.tar.bz2
xmlsec1-f251dedaa31b48f7c05a4b53c112b40ebca890ef.zip
Imported Upstream version 1.2.18upstream/1.2.18
Diffstat (limited to 'scripts/test_errors.pl')
-rwxr-xr-xscripts/test_errors.pl38
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;
+}