You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by jo...@apache.org on 2005/04/17 19:44:08 UTC
svn commit: r161675 - in incubator/nutch/trunk/src/plugin: build.xml
parse-ext/src/test/org/apache/nutch/parse/ext/TestExtParser.java
Author: johnx
Date: Sun Apr 17 10:44:07 2005
New Revision: 161675
URL: http://svn.apache.org/viewcvs?view=rev&rev=161675
Log:
Fixed junit test for plugin parse-ext.
Modified:
incubator/nutch/trunk/src/plugin/build.xml
incubator/nutch/trunk/src/plugin/parse-ext/src/test/org/apache/nutch/parse/ext/TestExtParser.java
Modified: incubator/nutch/trunk/src/plugin/build.xml
URL: http://svn.apache.org/viewcvs/incubator/nutch/trunk/src/plugin/build.xml?view=diff&r1=161674&r2=161675
==============================================================================
--- incubator/nutch/trunk/src/plugin/build.xml (original)
+++ incubator/nutch/trunk/src/plugin/build.xml Sun Apr 17 10:44:07 2005
@@ -40,7 +40,7 @@
<ant dir="parse-msword" target="test"/>
<!-- <ant dir="parse-mp3" target="test"/> -->
<!-- <ant dir="parse-rtf" target="test"/> -->
-<!-- <ant dir="parse-ext" target="test"/> -->
+ <ant dir="parse-ext" target="test"/>
<ant dir="creativecommons" target="test"/>
<ant dir="languageidentifier" target="test"/>
<ant dir="ontology" target="test"/>
Modified: incubator/nutch/trunk/src/plugin/parse-ext/src/test/org/apache/nutch/parse/ext/TestExtParser.java
URL: http://svn.apache.org/viewcvs/incubator/nutch/trunk/src/plugin/parse-ext/src/test/org/apache/nutch/parse/ext/TestExtParser.java?view=diff&r1=161674&r2=161675
==============================================================================
--- incubator/nutch/trunk/src/plugin/parse-ext/src/test/org/apache/nutch/parse/ext/TestExtParser.java (original)
+++ incubator/nutch/trunk/src/plugin/parse-ext/src/test/org/apache/nutch/parse/ext/TestExtParser.java Sun Apr 17 10:44:07 2005
@@ -66,10 +66,10 @@
File tempDir = new File(path);
if (!tempDir.exists())
tempDir.mkdir();
- tempFile = File.createTempFile("nutch.test.plugin.ExtParser.","",tempDir);
+ tempFile = File.createTempFile("nutch.test.plugin.ExtParser.",".txt",tempDir);
} else {
// otherwise in java.io.tmpdir
- tempFile = File.createTempFile("nutch.test.plugin.ExtParser.","");
+ tempFile = File.createTempFile("nutch.test.plugin.ExtParser.",".txt");
}
urlString = tempFile.toURL().toString();
@@ -96,8 +96,11 @@
String contentType;
// now test only on linux platform
- if (!System.getProperty("os.name").equalsIgnoreCase("linux"))
+ if (!System.getProperty("os.name").equalsIgnoreCase("linux")) {
+ System.err.println("Current OS is "+System.getProperty("os.name")+".");
+ System.err.println("No test is run on OS other than linux.");
return;
+ }
// loop alternately, total 10*2 times of invoking external command
for (int i=0; i<10; i++) {