99import org .junit .jupiter .api .Test ;
1010import org .junit .jupiter .api .io .TempDir ;
1111
12+ import java .io .IOException ;
13+ import java .nio .file .Files ;
1214import java .nio .file .Path ;
1315import java .time .Duration ;
1416
@@ -25,11 +27,42 @@ public void testSupport() {
2527 }
2628
2729 @ Test
28- @ DisplayName ("Adds for 20s an entryto the Nautilus sidebar" )
30+ @ DisplayName ("Adds for 20s an entry to the Nautilus sidebar" )
2931 @ 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 );
3264 Thread .sleep (Duration .ofSeconds (20 ));
3365 entry .remove ();
3466 }
67+
3568}
0 commit comments