aboutsummaryrefslogtreecommitdiff
path: root/Perl/t
diff options
context:
space:
mode:
authormertz2002-05-28 08:33:24 +0000
committermertz2002-05-28 08:33:24 +0000
commita078575cd04554a0baf2cc90be00bae5494b4575 (patch)
treef0993b4dc27bf0f9487a6280b6ec966de803c865 /Perl/t
parent7af0e51ec99988007b3eee4d37d27391e3c6e591 (diff)
downloadtkzinc-a078575cd04554a0baf2cc90be00bae5494b4575.zip
tkzinc-a078575cd04554a0baf2cc90be00bae5494b4575.tar.gz
tkzinc-a078575cd04554a0baf2cc90be00bae5494b4575.tar.bz2
tkzinc-a078575cd04554a0baf2cc90be00bae5494b4575.tar.xz
d�tection + propre de l'absence du 1er et seul argument, le fihcier refman.tex
affichage de la version de zinc test�e
Diffstat (limited to 'Perl/t')
-rw-r--r--Perl/t/testdoc.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/Perl/t/testdoc.pl b/Perl/t/testdoc.pl
index 5b82cbd..d054f45 100644
--- a/Perl/t/testdoc.pl
+++ b/Perl/t/testdoc.pl
@@ -14,6 +14,7 @@ use Tk::Zinc;
use strict;
+
my $mw = MainWindow->new();
# Creating the zinc widget
@@ -53,11 +54,15 @@ my $prev_attribute = 0;
my %documentedOptions;
my %itemAttributeDoc;
+die "missing refman.tex path_name as unique argument to this script" unless defined $ARGV[0];
+
+
&scanDoc ($ARGV[0]);
sub scanDoc {
my ($filename) = @_;
open (DOC, $filename) or die "unable to open " . $filename . "\n";
+ print "------- Testing conformity of refman.tex and meta-information from zinc Version $Tk::Zinc::VERSION\n";
while (<DOC>) {
if ( /^\\attribute\{(\w+)\}\{(\w+)\}\{(\w+)\}/ ) {
$itemAttributeDoc{$1}{-$2}=$3;
@@ -94,7 +99,7 @@ sub testAllOptions {
foreach my $optionName (sort keys %options) {
my ($optionType, $readOnly, $empty, $optionValue) = @{$options{$optionName}};
# $empty is for provision by Zinc
-
+
if (!defined $documentedOptions{$optionName}) {
print "E: $optionName ($optionType) of Zinc IS NOT DOCUMENTED!\n";
$options{$optionName} = undef;