Author: assaf
Date: Thu Oct 30 10:44:02 2008
New Revision: 709215
URL: http://svn.apache.org/viewvc?rev=709215&view=rev
Log:
Even better regexp for TestNG class names, mostly as an excercise in scan()
minimalism.
Modified:
incubator/buildr/trunk/lib/buildr/java/tests.rb
Modified: incubator/buildr/trunk/lib/buildr/java/tests.rb
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/tests.rb?rev=709215&r1=709214&r2=709215&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/tests.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/tests.rb Thu Oct 30 10:44:02 2008
@@ -314,7 +314,7 @@
rescue
# testng-failed.xml contains the list of failed tests *only*
report = File.read(File.join(task.report_to.to_s, 'testng-failed.xml'))
- failed = report.scan(/(<class name=")([^"]*)(">)/im).map { |s,
testname, e| testname }
+ failed = report.scan(/<class name="(.*)">/im).flatten
# return the list of passed tests
return tests - failed
end