Repository navigation
Commit 8070817
llama-atmosphere-agent: make ShellToolTest run on Windows too
ShellToolTest used POSIX commands (ls, sleep, printf, `; exit 3`) and failed 4 of 5
tests on Windows, where ShellTool runs cmd.exe /c. Each test now picks its command
line with ShellTool.isWindows() -- the same detection ShellTool.run uses to choose
the shell -- so it always speaks the shell the tool actually starts:
- ls / dir /b
- `echo boom 1>&2; exit 3` / `echo boom 1>&2 & exit 3`
- truncation: echo on both, the expected length counts the platform's line
separator (\n from sh, \r\n from cmd.exe)
- sleep 30 / ping -n 30 127.0.0.1 >nul (also a child of the shell, so the
descendant kill stays covered)
Verified: Windows 11 (all 31 agent tests), Linux in maven:3.9-eclipse-temurin-21
(ShellToolTest 5/5, AgentOptionsTest 11/11).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G1 parent 96cbbc7 commit 8070817
2 files changed
Lines changed: 37 additions & 10 deletions
File tree
- llama-atmosphere-agent/src/test/java/net/ladenthin/llama/atmosphere
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2214 | 2214 | | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
2220 | 2222 | | |
2221 | 2223 | | |
2222 | 2224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
25 | 41 | | |
26 | 42 | | |
27 | 43 | | |
28 | 44 | | |
29 | 45 | | |
30 | | - | |
| 46 | + | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
| |||
38 | 54 | | |
39 | 55 | | |
40 | 56 | | |
41 | | - | |
| 57 | + | |
| 58 | + | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
| |||
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
60 | 82 | | |
61 | 83 | | |
62 | 84 | | |
63 | 85 | | |
64 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
65 | 90 | | |
66 | 91 | | |
67 | 92 | | |
| |||
0 commit comments