git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fd86db8
)
JAL-4277 No longer using getCanonicalPath() for parent dir -- fix test
author
Ben Soares
<b.soares@dundee.ac.uk>
Tue, 12 Sep 2023 10:17:16 +0000
(11:17 +0100)
committer
Ben Soares
<b.soares@dundee.ac.uk>
Tue, 12 Sep 2023 10:17:16 +0000
(11:17 +0100)
test/jalview/util/FileUtilsTest.java
patch
|
blob
|
history
diff --git
a/test/jalview/util/FileUtilsTest.java
b/test/jalview/util/FileUtilsTest.java
index
1597718
..
666b33b
100644
(file)
--- a/
test/jalview/util/FileUtilsTest.java
+++ b/
test/jalview/util/FileUtilsTest.java
@@
-21,7
+21,6
@@
package jalview.util;
import java.io.File;
package jalview.util;
import java.io.File;
-import java.io.IOException;
import java.util.List;
import org.testng.Assert;
import java.util.List;
import org.testng.Assert;
@@
-98,16
+97,7
@@
public class FileUtilsTest
@DataProvider(name = "dirnamesAndBasenames")
public Object[][] dirnamesAndBasenames()
{
@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" }, //
return new Object[][] { // -1=startsWith, 0=equals, 1=endsWith
{ "~/hello/sailor", homeDir, "/hello", "sailor", "~" }, //
{ "./examples/uniref50.fa", "./", "examples", "uniref50", "Users" }, //