package jalview.util;
import java.io.File;
-import java.io.IOException;
import java.util.List;
import org.testng.Assert;
@DataProvider(name = "dirnamesAndBasenames")
public Object[][] dirnamesAndBasenames()
{
- String homeDir = null;
- try
- {
- homeDir = new File(System.getProperty("user.home"))
- .getCanonicalPath();
- } catch (IOException e)
- {
- System.err.println("Problem getting canonical home dir");
- e.printStackTrace();
- }
+ String homeDir = new File(System.getProperty("user.home")).getPath();
return new Object[][] { // -1=startsWith, 0=equals, 1=endsWith
{ "~/hello/sailor", homeDir, "/hello", "sailor", "~" }, //
{ "./examples/uniref50.fa", "./", "examples", "uniref50", "Users" }, //