9
9
import org .junit .jupiter .api .Test ;
10
10
import org .junit .jupiter .api .io .TempDir ;
11
11
12
+ import java .io .IOException ;
13
+ import java .nio .file .Files ;
12
14
import java .nio .file .Path ;
13
15
import java .time .Duration ;
14
16
@@ -25,11 +27,42 @@ public void testSupport() {
25
27
}
26
28
27
29
@ Test
28
- @ DisplayName ("Adds for 20s an entryto the Nautilus sidebar" )
30
+ @ DisplayName ("Adds for 20s an entry to the Nautilus sidebar" )
29
31
@ Disabled
30
- public void testSidebarIntegration (@ TempDir Path tmpdir ) throws QuickAccessServiceException , InterruptedException {
31
- var entry = new NautilusBookmarks ().add (tmpdir , "integrations-linux" );
32
+ public void testSidebarIntegrationEasy (@ TempDir Path tmpdir ) throws QuickAccessServiceException , InterruptedException , IOException {
33
+ var target = tmpdir .resolve ("foobar" );
34
+ testSidebarIntegration (target , "foobar" );
35
+ }
36
+
37
+ @ Test
38
+ @ DisplayName ("Adds for 20s an entry to the Nautilus sidebar. The target dir contains a space." )
39
+ @ Disabled
40
+ public void testSidebarIntegrationSpace (@ TempDir Path tmpdir ) throws QuickAccessServiceException , InterruptedException , IOException {
41
+ var target = tmpdir .resolve ("foo bar" );
42
+ testSidebarIntegration (target , "foobar" );
43
+ }
44
+
45
+ @ Test
46
+ @ DisplayName ("Adds for 20s an entry to the Nautilus sidebar. The target dir contains non ascii." )
47
+ @ Disabled
48
+ public void testSidebarIntegrationNonASCII (@ TempDir Path tmpdir ) throws QuickAccessServiceException , InterruptedException , IOException {
49
+ var target = tmpdir .resolve ("f한obÄr" );
50
+ testSidebarIntegration (target , "foobar" );
51
+ }
52
+
53
+ @ Test
54
+ @ DisplayName ("Adds for 20s an entry to the Nautilus sidebar. The target dir contains non ascii." )
55
+ @ Disabled
56
+ public void testSidebarIntegrationName (@ TempDir Path tmpdir ) throws QuickAccessServiceException , InterruptedException , IOException {
57
+ var target = tmpdir .resolve ("foobar" );
58
+ testSidebarIntegration (target , "f한o bÄr" );
59
+ }
60
+
61
+ private void testSidebarIntegration (Path target , String name ) throws IOException , InterruptedException , QuickAccessServiceException {
62
+ Files .createDirectory (target );
63
+ var entry = new NautilusBookmarks ().add (target , name );
32
64
Thread .sleep (Duration .ofSeconds (20 ));
33
65
entry .remove ();
34
66
}
67
+
35
68
}
0 commit comments