/** Test pushy.io.File.getAbsolutePath(). */ public void testFileGetAbsolutePath() { OsModule os = (OsModule) client.getModule("os"); TempfileModule tempfile = (TempfileModule) client.getModule("tempfile"); File dir = tempfile.mkdtemp(); assertTrue(dir.exists()); String cwd = client.getSystem().getProperty("user.dir"); try { os.chdir(dir.getAbsolutePath()); assertEquals(dir.getAbsolutePath(), new pushy.io.File(client, ".").getAbsolutePath()); } finally { os.chdir(cwd); // Go back to where you came from. dir.delete(); } }