Commit f69e8be
committed
fix(repl): cross-platform CI failures (Windows paths, prompt_toolkit on Windows, libedit on macOS)
Three independent issues, one commit:
- `.save C:\Users\…\scratch.robot` no longer mangles the path on
Windows. `shlex.split` was consuming backslashes as escape
characters; switch to a custom shlex with `escape=""` so paths
arrive intact while shell-style quoting (for spaces in paths)
still works. Fixes the four `.save` test failures on Windows.
- `PromptSession()` no longer crashes on Windows CI runners with
`NoConsoleScreenBufferError`. The runners advertise TERM=xterm-256color
but expose no real Windows console buffer, so prompt_toolkit's
eager `Win32Output` init blew up. A new repl-test conftest wraps
every test in `create_app_session(output=DummyOutput())`, detaching
prompt_toolkit instantiation from the runner's terminal. Fixes
the nine prompt_toolkit-instantiation failures on Windows.
- The two readline history-file round-trip tests now use
`@pytest.mark.skipif(_IS_LIBEDIT, …)` and a parallel
libedit-only variant. The original test seeded the file with
plain text, which only loads on GNU readline; the libedit variant
seeds via `readline.write_history_file` so the file gets libedit's
expected `_HiStOrY_V2_` header. The out-of-range test was
refactored to seed via `write_history_file` directly and now runs
unchanged on both backends. Coverage stays equivalent across
platforms.1 parent 372afca commit f69e8be
3 files changed
Lines changed: 123 additions & 14 deletions
File tree
- packages/repl/src/robotcode/repl
- tests/robotcode/repl
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
493 | 504 | | |
494 | 505 | | |
495 | 506 | | |
| |||
532 | 543 | | |
533 | 544 | | |
534 | 545 | | |
535 | | - | |
| 546 | + | |
536 | 547 | | |
537 | 548 | | |
538 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
13 | 32 | | |
14 | 33 | | |
15 | 34 | | |
| |||
201 | 220 | | |
202 | 221 | | |
203 | 222 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
208 | 260 | | |
209 | 261 | | |
210 | 262 | | |
| |||
231 | 283 | | |
232 | 284 | | |
233 | 285 | | |
234 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
235 | 296 | | |
236 | | - | |
237 | | - | |
| 297 | + | |
238 | 298 | | |
239 | | - | |
| 299 | + | |
240 | 300 | | |
241 | | - | |
| 301 | + | |
| 302 | + | |
242 | 303 | | |
243 | | - | |
244 | | - | |
| 304 | + | |
| 305 | + | |
245 | 306 | | |
246 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
247 | 319 | | |
248 | | - | |
249 | 320 | | |
250 | 321 | | |
251 | 322 | | |
| |||
0 commit comments