Changeset 19609 in josm for trunk/test


Ignore:
Timestamp:
2026-08-09T23:39:09+02:00 (3 days ago)
Author:
Don-vip
Message:

"echo" is a shell builtin on Windows, not a standalone executable ProcessBuilder can find

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java

    r19125 r19609  
    524524    @Test
    525525    void testExecOutput() throws Exception {
    526         final String output = Utils.execOutput(Arrays.asList("echo", "Hello", "World"));
     526        // "echo" is a shell builtin on Windows, not a standalone executable ProcessBuilder can find.
     527        final List<String> command = PlatformManager.isPlatformWindows()
     528                ? Arrays.asList("cmd", "/c", "echo", "Hello", "World")
     529                : Arrays.asList("echo", "Hello", "World");
     530        final String output = Utils.execOutput(command);
    527531        assertEquals("Hello World", output);
    528532    }
Note: See TracChangeset for help on using the changeset viewer.