* @throws IOException
* @throws InterruptedException
*/
@Test
public void testSymlinkAttributes() throws IOException, InterruptedException {
FS fs = FS.DETECTED;
File link = new File(trash, "ä");
File target = new File(trash, "å");
fs.createSymLink(link, "å");
assertTrue(fs.exists(link));
String targetName = fs.readSymLink(link);
assertEquals("å", targetName);
assertTrue(fs.lastModified(link) > 0);
assertTrue(fs.exists(link));
assertFalse(fs.canExecute(link));
assertEquals(2, fs.length(link));
assertFalse(fs.exists(target));
assertFalse(fs.isFile(target));
assertFalse(fs.isDirectory(target));
assertFalse(fs.canExecute(target));
RepositoryTestCase.fsTick(link);
// Now create the link target
FileUtils.createNewFile(target);
assertTrue(fs.exists(link));
assertTrue(fs.lastModified(link) > 0);
assertTrue(fs.lastModified(target) > fs.lastModified(link));
assertFalse(fs.canExecute(link));
fs.setExecute(target, true);
assertFalse(fs.canExecute(link));
assertTrue(fs.canExecute(target));
}