You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Add automated test coverage for clink_vfox.lua #728
internal/shell/clink_vfox.lua (Clink completion/startup script) currently has zero automated coverage. Changes like #724 can only be verified by manual testing on Windows/Clink: neither the windows-regressions CI job (env path format, TestOpenSkipsVfoxShim, TestInstall) nor any Go test exercises the script, unlike Fish/Bash/Zsh completions which have integration tests in cmd/completion_test.go. This means regressions in vfox available / vfox ls output parsing or per-command completions (use/unuse/exec/info/remove/env flags) go unnoticed until a user hits them.
2. What is your expected outcome?
Add a gopher-lua-based unit test (e.g. internal/shell/clink_test.go, the repo already depends on github.com/yuin/gopher-lua) that loads clink_vfox.lua with stubbed clink.argmatcher, io.popen, io.open, and os.setenv/getenv, feeds canned vfox available / vfox ls outputs (including tree glyphs └ ─ ├ │ ┬ and ✓/✗ markers), and asserts the resulting completion lists for use/unuse/exec/info/remove/env. This runs inside the existing go test ./... matrix (which already includes windows-latest), so no new CI job or real Clink installation is needed. Optionally add golden tests locking the vfox available (two-space prefix) and vfox ls tree output formats the script depends on. Ref: #724.
Activity
linghengqian commentedon Oct 22, 2026
test(clink): cover clink_vfox.lua and the output formats it parses
test(clink): cover clink_vfox.lua and fix the bugs found by the tests (…