-
-
Notifications
You must be signed in to change notification settings - Fork 449
Expand file tree
/
Copy pathTestUtils.java
More file actions
37 lines (28 loc) · 1.39 KB
/
Copy pathTestUtils.java
File metadata and controls
37 lines (28 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import app.f3d.F3D.*;
import java.util.List;
public class TestUtils {
public static void main(String[] args) {
int distance1 = Utils.textDistance("kitten", "sitting");
int distance2 = Utils.textDistance("same", "same");
List<String> tokens1 = Utils.tokenize("one two \"three four\" # comment");
List<String> tokens2 = Utils.tokenize("one two \"three four\" # comment", true);
List<String> tokens3 = Utils.tokenize("one two \"three four\" # comment", false);
String collapsed1 = Utils.collapsePath(".");
String collapsed2 = Utils.collapsePath(".", "");
String collapsed3 = Utils.collapsePath("test.txt", "/tmp");
String regex1 = Utils.globToRegex("*.txt");
String regex2 = Utils.globToRegex("*.txt", '/');
String regex3 = Utils.globToRegex("test/**/*.txt", '/');
String envPath = Utils.getEnv("PATH");
String envNonExistent = Utils.getEnv("F3D_NONEXISTENT_VAR_12345");
Utils.KnownFolder.ROAMINGAPPDATA.getValue();
Utils.KnownFolder.LOCALAPPDATA.getValue();
Utils.KnownFolder.PICTURES.getValue();
Utils.KnownFolder.fromValue(0);
Utils.KnownFolder.fromValue(1);
Utils.KnownFolder.fromValue(2);
String knownFolder1 = Utils.getKnownFolder(Utils.KnownFolder.ROAMINGAPPDATA);
String knownFolder2 = Utils.getKnownFolder(Utils.KnownFolder.LOCALAPPDATA);
String knownFolder3 = Utils.getKnownFolder(Utils.KnownFolder.PICTURES);
}
}