@ -41,4 +41,11 @@ public class EnvKit {
throw new IllegalArgumentException("Cannot set " + path + " as work directory.");
}
/**
* 退出当前工作目录
*/
public static void checkout() {
SimpleWork.checkOut();
@ -32,4 +32,13 @@ public class EnvKitTest extends Prepare {
EnvKit.setCurrent(path);
Assert.assertEquals(EnvKit.getCurrent().getPath(), path);
@Test
public void exit() {
String path = "usr/shared/webroot/WEB-INF";
EnvKit.checkout();
Assert.assertNull(EnvKit.getCurrent());
Assert.assertNull(EnvKit.getWorkResource());