From: Curt A. <ca...@us...> - 2002-04-10 06:44:31
|
Update of /cvsroot/ant-contrib/cpptasks/test/junit/net/sf/antcontrib/cpptasks In directory usw-pr-cvs1:/tmp/cvs-serv14508 Modified Files: TestCUtil.java Log Message: Skip UNC test if not Windows Index: TestCUtil.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/test/junit/net/sf/antcontrib/cpptasks/TestCUtil.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestCUtil.java 17 Mar 2002 05:11:01 -0000 1.4 --- TestCUtil.java 10 Apr 2002 06:44:28 -0000 1.5 *************** *** 92,106 **** assertEquals(expected,rel); ! File uncFile = new File("\\\\fred\\foo.bar"); ! String uncPath; ! try { ! uncPath = uncFile.getCanonicalPath(); ! } ! catch(IOException ex) { ! uncPath = uncFile.toString(); ! } ! rel = CUtil.getRelativePath(canonicalBase,uncFile); ! assertEquals(uncPath,rel); } public void testParsePath1() { --- 92,112 ---- assertEquals(expected,rel); ! // ! // skip the UNC test unless running on Windows ! // ! String osName = System.getProperty("os.name"); ! if(osName.indexOf("Windows") >= 0) { ! File uncFile = new File("\\\\fred\\foo.bar"); ! String uncPath; ! try { ! uncPath = uncFile.getCanonicalPath(); ! } ! catch(IOException ex) { ! uncPath = uncFile.toString(); ! } ! rel = CUtil.getRelativePath(canonicalBase,uncFile); ! assertEquals(uncPath,rel); } + } public void testParsePath1() { |