|
29 | 29 | * |
30 | 30 | * @author Peter Donald |
31 | 31 | * @author Matthew Hawthorne |
32 | | - * @version $Id: FilenameUtilsTestCase.java,v 1.10 2004/10/24 01:27:13 martinc Exp $ |
| 32 | + * @author Martin Cooper |
| 33 | + * @version $Id: FilenameUtilsTestCase.java,v 1.11 2004/10/24 18:34:23 martinc Exp $ |
33 | 34 | * @see FilenameUtils |
34 | 35 | */ |
35 | 36 | public class FilenameUtilsTestCase extends FileBasedTestCase { |
@@ -220,13 +221,13 @@ public void testGetExtension() { |
220 | 221 |
|
221 | 222 | public void testGetExtensionWithPaths() { |
222 | 223 | String[][] testsWithPaths = |
223 | | - { { File.separator + "tmp" + File.separator + "foo" + File.separator + "filename.ext", "ext" }, { |
224 | | - //"C:\\temp\\foo\\filename.ext", "ext" }, { |
225 | | - File.separator + "tmp" + File.separator + "foo.bar" + File.separator + "filename.ext", "ext" }, { |
226 | | - //"C:\\temp\\foo.bar\\filename.ext", "ext" }, { |
227 | | - File.separator + "tmp" + File.separator + "foo.bar" + File.separator + "README", "" }, { |
228 | | - //"C:\\temp\\foo.bar\\README", "" }, { |
229 | | - ".." + File.separator + "filename.ext", "ext" } |
| 224 | + { { "/tmp/foo/filename.ext", "ext" }, { |
| 225 | + "C:\\temp\\foo\\filename.ext", "ext" }, { |
| 226 | + "/tmp/foo.bar/filename.ext", "ext" }, { |
| 227 | + "C:\\temp\\foo.bar\\filename.ext", "ext" }, { |
| 228 | + "/tmp/foo.bar/README", "" }, { |
| 229 | + "C:\\temp\\foo.bar\\README", "" }, { |
| 230 | + "../filename.ext", "ext" } |
230 | 231 | }; |
231 | 232 | for (int i = 0; i < testsWithPaths.length; i++) { |
232 | 233 | assertEquals( |
@@ -256,17 +257,13 @@ public void testRemoveExtension() { |
256 | 257 |
|
257 | 258 | public void testRemoveExtensionWithPaths() { |
258 | 259 | String[][] testsWithPaths = |
259 | | - { { File.separator + "tmp" + File.separator + "foo" + File.separator + "filename.ext", |
260 | | - File.separator + "tmp" + File.separator + "foo" + File.separator + "filename" }, { |
261 | | - //"C:\\temp\\foo\\filename.ext", "filename" }, { |
262 | | - File.separator + "tmp" + File.separator + "foo.bar" + File.separator + "filename.ext", |
263 | | - File.separator + "tmp" + File.separator + "foo.bar" + File.separator + "filename" }, { |
264 | | - //"C:\\temp\\foo.bar\\filename.ext", "filename" }, { |
265 | | - File.separator + "tmp" + File.separator + "foo.bar" + File.separator + "README", |
266 | | - File.separator + "tmp" + File.separator + "foo.bar" + File.separator + "README" }, { |
267 | | - //"C:\\temp\\foo.bar\\README", "README" }, { |
268 | | - ".." + File.separator + "filename.ext", |
269 | | - ".." + File.separator + "filename" } |
| 260 | + { { "/tmp/foo/filename.ext", "/tmp/foo/filename" }, { |
| 261 | + "C:\\temp\\foo\\filename.ext", "C:\\temp\\foo\\filename" }, { |
| 262 | + "/tmp/foo.bar/filename.ext", "/tmp/foo.bar/filename" }, { |
| 263 | + "C:\\temp\\foo.bar\\filename.ext", "C:\\temp\\foo.bar\\filename" }, { |
| 264 | + "/tmp/foo.bar/README", "/tmp/foo.bar/README" }, { |
| 265 | + "C:\\temp\\foo.bar\\README", "C:\\temp\\foo.bar\\README" }, { |
| 266 | + "../filename.ext", "../filename" } |
270 | 267 | }; |
271 | 268 |
|
272 | 269 | for (int i = 0; i < testsWithPaths.length; i++) { |
|
0 commit comments