Author: ozizka(a)redhat.com
Date: 2009-06-11 19:26:54 -0400 (Thu, 11 Jun 2009)
New Revision: 522
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
Log:
ScriptTest updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-11
21:46:02 UTC (rev 521)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-11
23:26:54 UTC (rev 522)
@@ -4,11 +4,13 @@
import com.gargoylesoftware.htmlunit.html.HtmlDivision;
import java.io.File;
import java.io.FileWriter;
+import java.io.FilenameFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.apache.commons.io.filefilter.SuffixFileFilter;
import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
import org.jboss.jopr.jsfunit.util.ActiveConditionChecker;
@@ -16,6 +18,7 @@
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.NavTreeNode;
+import org.jboss.util.file.FilenamePrefixFilter;
import org.jboss.util.file.FilenameSuffixFilter;
/**
@@ -48,7 +51,9 @@
throw new EmbJoprTestException(binDir.getAbsolutePath()+" is not a
directory.");
// Get the list of .sh files in the <JBOSS_HOME>/bin dir.
- File scriptFiles[] = binDir.listFiles(new FilenameSuffixFilter(".sh"));
+ log.info("Scanning directory "+binDir.getAbsolutePath());
+ //File scriptFiles[] = binDir.listFiles(new FilenameSuffixFilter("sh"));
+ File scriptFiles[] = binDir.listFiles((FilenameFilter)new
SuffixFileFilter(".sh"));
/*
List<String> notListedScripts = new ArrayList();
@@ -83,7 +88,7 @@
// Remove all scripts listed on this page from the not-listed list.
ContentTable scriptListingTable =
ejtt.getTabMenu().getTabContentBox().getDefaultTable();
for( ContentTableRow row : scriptListingTable.getRows() ) {
- String scriptName = row.getCell(0).getTextContent();
+ String scriptName = row.getCell(0).getTextContent().trim();
notListedScripts.remove(scriptName);
log.info("Listed script: '"+scriptName+"'");
}
Show replies by date