Sync with 5.3.0
[deliverable/titan.core.git] / regression_test / XML / XER / checkit.pl
CommitLineData
970ed795
EL
1#!/usr/bin/perl -w
2###############################################################################
3# Copyright (c) 2000-2014 Ericsson Telecom AB
4# All rights reserved. This program and the accompanying materials
5# are made available under the terms of the Eclipse Public License v1.0
6# which accompanies this distribution, and is available at
7# http://www.eclipse.org/legal/epl-v10.html
8###############################################################################
9
10
11use strict;
12
13if ($] < 5.006) {
14 # ancient perl, we must be on Solaris :(
15 my @perlloc = qw( /proj/TTCN/Tools/perl-5.10.1/bin/perl /mnt/TTCN/Tools/perl-5.10.1/bin/perl );
16 foreach (@perlloc) {
17 if (-x $_) {
18 warn "Let's try with $_ instead";
19 exec( $_, $0, @ARGV ) or die "That didn't work either: $!";
20 }
21 }
22}
23else {
24 require Test::More;
25 Test::More->import('no_plan');
26}
27
28#use re qw(debug);
29
30my %versions = (
31'converter' => '',
32'UTF8' => '',
33'Txerasntypes' => 'R8A',
34'Txerboolean' => 'R8B',
35'Txerenum' => 'R8E',
36'Txerfloat' => 'R8F',
37'Txerint' => 'R8J',
38'Txernested' => 'R8N',
39'Txerobjclass' => '',
40'Txersets' => '',
41'Txerstring' => 'R8Z',
42'Txerbinstr' => 'R99999A',
43'Asntypes' => '',
44'AsnValues' => '',
45'EmptyUnion' => '',
46'ObjectClass' => '',
47'ObjectClassWithSyntax' => '',
48'Sets' => '',
49'SetValues' => '',
50'junk' => '',
51# built-in modules for the logger
52'TitanLoggerApi' => '',
53'TitanLoggerControl' => '',
a38c6d4c 54'PreGenRecordOf' => '',
970ed795
EL
55);
56
57
58
59while ( <> ) {
60 chomp;
61
62 if ( my ($mod, $type, $md5, $rev) =
63 m/^
64 (\w+) # module name
65 \s+
66 (TTCN-3|ASN\.1) # type
67 \s+
68 (?: # dodge the compilation date
69 # Hopefully not affected by i18n: this is American style mm dd yyyy
70 [A-Z][a-z][a-z] # month
71 \s
72 [\s\d]\d # day of the month
73 \s
74 \d{4} # year
75 \s
76 \d\d # hour
77 :
78 \d\d # min
79 :
80 \d\d # sec
81 \s+
82 )?
83 ([0-9a-fA-F]{32})?
84 \s*
85 (R\d+\w?)?/x ) {
86 $md5 ||= '';
87 $rev ||= '';
88 #print "$mod\t, $type\t, $md5, $rev";
89 if (ok(exists $versions{$mod}, " \tKnown module $mod")) {
90 # got, exp, name
91 is ($rev, $versions{$mod}, " \tVersion for $mod");
92 delete $versions{$mod};
93 }
94 else {
95 #die "Unknown module name $mod";
96 SKIP: {
97 skip( " \tversion check for unknown module $mod", 1 );
98 }
99 }
100 }
101 #else {warn $_;}
102}
103
104#done_testing();
This page took 0.026939 seconds and 5 git commands to generate.