diff options
author | acolyer <acolyer> | 2004-06-02 12:03:33 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-06-02 12:03:33 +0000 |
commit | 775136e0101461d2ee3d6332ee805854861e0b7b (patch) | |
tree | 637e9f8b6c73e168ae54d6cbcf57ce8bc3bcecdd /util | |
parent | 39c3a3bb4a0c939c1dfbc33b0ba560614b43d8a2 (diff) | |
download | aspectj-775136e0101461d2ee3d6332ee805854861e0b7b.tar.gz aspectj-775136e0101461d2ee3d6332ee805854861e0b7b.zip |
also verigy that dir entries are copied when copying a dir.
Diffstat (limited to 'util')
-rw-r--r-- | util/testsrc/org/aspectj/util/FileUtilTest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/util/testsrc/org/aspectj/util/FileUtilTest.java b/util/testsrc/org/aspectj/util/FileUtilTest.java index b39c092de..74f0e3923 100644 --- a/util/testsrc/org/aspectj/util/FileUtilTest.java +++ b/util/testsrc/org/aspectj/util/FileUtilTest.java @@ -254,9 +254,14 @@ public class FileUtilTest extends TestCase { assertTrue(null == exceptionClass); if (to.isFile()) { assertTrue(from.length() == to.length()); // XXX cheap test + } else if (!from.isDirectory()){ + File toFile = new File(to, from.getName()); + assertTrue(from.length() == toFile.length()); } else { - File toFile = new File(to, from.getName()); - assertTrue(from.length() == toFile.length()); + // from is a dir and to is a dir, toDir should be created, and have the + // same contents as fromDir. + assertTrue(to.exists()); + assertTrue(from.listFiles().length == to.listFiles().length); } } catch (Throwable t) { assertTrue(null != exceptionClass); |