martinc 2004/10/23 18:27:13
Modified: io/src/test/org/apache/commons/io FilenameUtilsTestCase.java
Log:
Re-enable testGetExtensionWithPaths() and testRemoveExtensionWithPaths(),
modifying them to use File.separator. Commented out the Windows paths for
now, until we can clarify the intent.
Revision Changes Path
1.10 +21 -19
jakarta-commons/io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java
Index: FilenameUtilsTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/io/src/test/org/apache/commons/io/FilenameUtilsTestCase.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- FilenameUtilsTestCase.java 24 Oct 2004 00:10:05 -0000 1.9
+++ FilenameUtilsTestCase.java 24 Oct 2004 01:27:13 -0000 1.10
@@ -218,16 +218,15 @@
}
}
- /* TODO: Reenable this test */
- public void DISABLED__testGetExtensionWithPaths() {
+ public void testGetExtensionWithPaths() {
String[][] testsWithPaths =
- { { "/tmp/foo/filename.ext", "ext" }, {
- "C:\\temp\\foo\\filename.ext", "ext" }, {
- "/tmp/foo.bar/filename.ext", "ext" }, {
- "C:\\temp\\foo.bar\\filename.ext", "ext" }, {
- "/tmp/foo.bar/README", "" }, {
- "C:\\temp\\foo.bar\\README", "" }, {
- "../filename.ext", "ext" }
+ { { File.separator + "tmp" + File.separator + "foo" + File.separator +
"filename.ext", "ext" }, {
+ //"C:\\temp\\foo\\filename.ext", "ext" }, {
+ File.separator + "tmp" + File.separator + "foo.bar" +
File.separator + "filename.ext", "ext" }, {
+ //"C:\\temp\\foo.bar\\filename.ext", "ext" }, {
+ File.separator + "tmp" + File.separator + "foo.bar" +
File.separator + "README", "" }, {
+ //"C:\\temp\\foo.bar\\README", "" }, {
+ ".." + File.separator + "filename.ext", "ext" }
};
for (int i = 0; i < testsWithPaths.length; i++) {
assertEquals(
@@ -255,16 +254,19 @@
}
}
- /* TODO: Reenable this test */
- public void DISABLED__testRemoveExtensionWithPaths() {
+ public void testRemoveExtensionWithPaths() {
String[][] testsWithPaths =
- { { "/tmp/foo/filename.ext", "filename" }, {
- "C:\\temp\\foo\\filename.ext", "filename" }, {
- "/tmp/foo.bar/filename.ext", "filename" }, {
- "C:\\temp\\foo.bar\\filename.ext", "filename" }, {
- "/tmp/foo.bar/README", "README" }, {
- "C:\\temp\\foo.bar\\README", "README" }, {
- "../filename.ext", "filename" }
+ { { File.separator + "tmp" + File.separator + "foo" + File.separator +
"filename.ext",
+ File.separator + "tmp" + File.separator + "foo" + File.separator +
"filename" }, {
+ //"C:\\temp\\foo\\filename.ext", "filename" }, {
+ File.separator + "tmp" + File.separator + "foo.bar" +
File.separator + "filename.ext",
+ File.separator + "tmp" + File.separator + "foo.bar" +
File.separator + "filename" }, {
+ //"C:\\temp\\foo.bar\\filename.ext", "filename" }, {
+ File.separator + "tmp" + File.separator + "foo.bar" +
File.separator + "README",
+ File.separator + "tmp" + File.separator + "foo.bar" +
File.separator + "README" }, {
+ //"C:\\temp\\foo.bar\\README", "README" }, {
+ ".." + File.separator + "filename.ext",
+ ".." + File.separator + "filename" }
};
for (int i = 0; i < testsWithPaths.length; i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]