Update of /cvsroot/boost/boost/tools/build/v2/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25977

Modified Files:
        BoostBuild.py 
Log Message:
Robustify Tester.expect_content

Index: BoostBuild.py
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/test/BoostBuild.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- BoostBuild.py       8 Nov 2006 08:36:02 -0000       1.77
+++ BoostBuild.py       8 Nov 2006 08:37:28 -0000       1.78
@@ -551,20 +551,22 @@
             self.fail_test(1)
 
         content = string.replace(content, "$toolset", self.toolset+"*")
-        
+
+        matched = 0
         if exact:
             matched = fnmatch.fnmatch(actual,content)
         else:
-            actual_ = map(lambda x: sorted(x.split()),actual.splitlines())
-            content_ = map(lambda x: sorted(x.split()),content.splitlines())
-            matched = map(
-                lambda x,y: map(lambda n,p: fnmatch.fnmatch(n,p),x,y),
-                actual_, content_ )
-            matched = reduce(
-                lambda x,y: x and reduce(
-                    lambda a,b: a and b,
+            if len(actual_) == len(content_):
+                actual_ = map(lambda x: sorted(x.split()),actual.splitlines())
+                content_ = map(lambda x: 
sorted(x.split()),content.splitlines())
+                matched = map(
+                    lambda x,y: map(lambda n,p: fnmatch.fnmatch(n,p),x,y),
+                    actual_, content_ )
+                matched = reduce(
+                    lambda x,y: x and reduce(
+                        lambda a,b: a and b,
                     y ),
-                matched )
+                    matched )
 
         if not matched:
             print "Expected:\n"


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to