Commits

Anonymous committed d013819 Merge

Merge Sheila's latest updates

Comments (0)

Files changed (3)

src/test/java/org/jhove2/module/format/sgml/OpenSpWrapperTest.java

 import static org.junit.Assert.fail;
 
 import java.io.File;
+import java.util.Properties;
 
 import javax.annotation.Resource;
 
 	protected String catalogPath;
 	protected Source inputSource;
 	protected OpenSpWrapper sp;
+	
+	protected SgmlModule wtestSgmlModule;
+	private SgmlModule wtestSgmlModule02;
 	/**
 	 * @throws java.lang.Exception
 	 */
 	@Before
 	public void setUp() throws Exception {
-
+		Properties prop   = System.getProperties();
+		String os = prop.getProperty("os.name");
+		if (os.toLowerCase().startsWith("win")){
+			testSgmlModule = wtestSgmlModule;
+			testSgmlModule02 = wtestSgmlModule02;
+		}
 		sp = (OpenSpWrapper) testSgmlModule.sgmlParser;
 		try {
 			sgmlDirPath = 
 	/**
 	 * @param testSgmlModule the testSgmlModule to set
 	 */
-	@Resource
+	@Resource(name="testSgmlModule")
 	public void setTestSgmlModule(SgmlModule testSgmlModule) {
 		this.testSgmlModule = testSgmlModule;
 	}
 		this.testSgmlModule02 = testSgmlModule02;
 	}
 
+	@Resource(name="wtestSgmlModule")
+	public void setWtestSgmlModule(SgmlModule wtestSgmlModule) {
+		this.wtestSgmlModule = wtestSgmlModule;
+	}
+
+	@Resource(name="wtestSgmlModule02")
+	public void setWtestSgmlModule02(SgmlModule wtestSgmlModule02) {
+		this.wtestSgmlModule02 = wtestSgmlModule02;
+	}
+
 }

src/test/java/org/jhove2/module/format/sgml/OpenSpWrapperWindowsExeTest.java

 	/**
 	 * @param wtestSgmlModule the wtestSgmlModule to set
 	 */
-	@Resource
+	@Resource(name="wtestSgmlModule")
 	public void setTestSgmlModule(SgmlModule testSgmlModule) {
 		this.wtestSgmlModule = testSgmlModule;
 	}

src/test/resources/config/module/format/sgml/test-config.xml

 	<bean id="wtestOpenSpWrapper" class="org.jhove2.module.format.sgml.OpenSpWrapper"
 	      scope="prototype">
         <property name="processHandler" ref="wtestExternalProcessHandler"/>
-        <!--  property name="onsgmlsPath" value="C:\PROGRA~1\OpenSp\onsgmls.exe"/ -->
-        <!--  property name="sgmlnormPath" value="C:\PROGRA~1\OpenSp\osgmlnorm.exe"/ -->
-        <property name="onsgmlsPath" value="C:\cygwin\bin\onsgmls.exe"/>
-        <property name="sgmlnormPath" value="C:\cygwin\bin\osgmlnorm.exe"/>
+        <property name="onsgmlsPath" value="C:\PROGRA~1\OpenSp\onsgmls.exe"/> 
+        <property name="sgmlnormPath" value="C:\PROGRA~1\OpenSp\osgmlnorm.exe"/> 
+<!--        <property name="onsgmlsPath" value="C:\cygwin\bin\onsgmls.exe"/>-->
+<!--        <property name="sgmlnormPath" value="C:\cygwin\bin\osgmlnorm.exe"/>-->
         <property name="onsgmlsOptions" ref="wTestOnsgmlsOptions"/>
         <property name="sgmlnormOptions" ref="wTestSgmlNormOptions"/>
         <property name="spaceEscapeChar" value='"'/>