From a078575cd04554a0baf2cc90be00bae5494b4575 Mon Sep 17 00:00:00 2001 From: mertz Date: Tue, 28 May 2002 08:33:24 +0000 Subject: d�tection + propre de l'absence du 1er et seul argument, le fihcier refman.tex affichage de la version de zinc test�e --- Perl/t/testdoc.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Perl/t/testdoc.pl') 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 () { 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; -- cgit v1.1