diff --git a/lib-commonbase/sourceTest/java/ch/systemsx/cisd/common/io/PosixTest.java b/lib-commonbase/sourceTest/java/ch/systemsx/cisd/common/io/PosixTest.java new file mode 100644 index 0000000000000000000000000000000000000000..f28bf92bdd61af3b4306c0dbc2313429869316a7 --- /dev/null +++ b/lib-commonbase/sourceTest/java/ch/systemsx/cisd/common/io/PosixTest.java @@ -0,0 +1,35 @@ +package ch.systemsx.cisd.common.io; + +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; + +public class PosixTest +{ + @Test + public void testGetEuid() + { + int euid = Posix.getEuid(); + } + + @Test + public void testGetUid() + { + int uid = Posix.getUid(); + } + + @Test + public void testGetGid() + { + int gid = Posix.getGid(); + } + + @Test + public void testSetOwner() throws IOException + { + File file = File.createTempFile("pre", "su"); + Posix.setOwner(file.getPath(), Posix.getUid(), Posix.getGid()); + file.delete(); + } +}