Skip to content

test: add Windows-only test for issue #348 shell detection - #399

Merged
max-sixty merged 3 commits into
mainfrom
windows
Jan 3, 2026
Merged

max-sixty merged 3 commits into
mainfrom
windows

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

Follow-up to #398

Test plan

  • Compiles on Unix (test is skipped via #[cfg(windows)])
  • Windows CI runs the test and validates the fix

This was written by Claude Code on behalf of @max-sixty

🤖 Generated with Claude Code

max-sixty and others added 3 commits January 3, 2026 13:38
Use `std::path::Path::file_name()` for platform-native path handling when
extracting shell names from `$SHELL`. This fixes Windows Git Bash where
`$SHELL` contains Windows-style paths like `C:\Program Files\Git\usr\bin\bash.exe`.

Changes:
- Add `extract_filename_from_path()` helper with case-insensitive `.exe` stripping
- Extract `shell_from_name()` for better testability
- Update pager detection to use case-insensitive matching for Windows commands
- Add tests for mixed-case `.exe` variants and platform-specific paths

Fixes #348

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Tests the full path-to-shell detection flow with real Windows Git Bash
paths. Only runs on Windows CI to validate the fix works on the actual
platform.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit f8e1dae into main Jan 3, 2026
@max-sixty
max-sixty deleted the windows branch January 3, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant