From fee9faf53940175ddc935f8ec23948574ef2b40c Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 19 Mar 2007 22:14:43 +0000 Subject: [PATCH] 2007-03-19 22:14:43 by steve Updated test to allow options with "-" in their name. (ie. --nfs-root + --nfs-server) --- tests/getopt.t | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/getopt.t b/tests/getopt.t index 7907ed7..01f29d8 100644 --- a/tests/getopt.t +++ b/tests/getopt.t @@ -7,7 +7,7 @@ # # Steve # -- -# $Id: getopt.t,v 1.3 2006-09-10 21:04:20 steve Exp $ +# $Id: getopt.t,v 1.4 2007-03-19 22:14:43 steve Exp $ use strict; @@ -47,7 +47,7 @@ sub testFile foreach my $line ( split( /\n/, $output ) ) { - if ( $line =~ /[ \t]*--([a-z-]+)/ ) + if ( $line =~ /[ \t]*--([a-z-_]+)/ ) { push @documented, $1; } @@ -91,6 +91,7 @@ sub testFile # foreach my $o ( split( /\n/, $opt ) ) { +#print "O: $o "; # # Strip trailing comments. # @@ -98,6 +99,7 @@ sub testFile { $o = $1; } +#print " - strip comments : $o "; # # Remove "" from around it. @@ -106,7 +108,7 @@ sub testFile { $o = $1; } - +#print " - remove quotes : $o "; # # Discard anything after "=", or " " # @@ -114,7 +116,7 @@ sub testFile { $o = $1; } - +#print " - remove = : $o "; # # Now avoid blank lines. #