[xen-tools-dev] [PATCH] Strip single quotes as well as double quotes.

Stéphane Jourdois sjourdois at gmail.com
Sun Jul 11 15:38:46 CEST 2010


---
 t/getopt.t |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/t/getopt.t b/t/getopt.t
index 9834d16..c62f6c1 100755
--- a/t/getopt.t
+++ b/t/getopt.t
@@ -59,7 +59,7 @@ sub testFile
     #
     #  Test we discovered some documented options.
     #
-    ok( $#documented > 1, "We found some options documented." );
+    ok( $#documented > 1, "We found some options documented in $file." );
 
 
 
@@ -105,11 +105,11 @@ sub testFile
 #print " - strip comments : $o ";
 
             #
-            #  Remove "" from around it.
+            #  Remove "" or '' around it.
             #
-            if ( $o =~ /"([^"]+)"/ )
+            if ( $o =~ /(["'])([^"']+)\1/ )
             {
-                $o = $1;
+                $o = $2;
             }
 #print " - remove quotes : $o ";
             #
-- 
1.5.6.5



More information about the xen-tools-dev mailing list