Skip to content

Strengthen tests and CI - #69

Merged
patakuti merged 4 commits into
mainfrom
ci-and-tests
Oct 2, 2026
Merged

patakuti merged 4 commits into
mainfrom
ci-and-tests

Conversation

@patakuti

@patakuti patakuti commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Tests: link rewriting (line refs, file:///, absolute paths per source), line anchors (incl. CRLF and raw HTML blocks), .txt conversion, local handler (Markdown, text, as-is files, directory listing, not found, path cleaning, ~ expansion, CSP nonce) and authMiddleware. Overall coverage 44% -> higher; handler 7.5% -> covered for the local path.
  • CI: run on ubuntu-latest and windows-latest (path handling), go test -race on Ubuntu, gofmt check via new make fmt-check.
  • Format two files that were not gofmt-clean (listmarker.go, resolve_test.go; formatting only).
  • README: CI badge, Contributing mentions make test / make fmt-check.

No production code behavior changes.

Notes

  • Windows tests are not run locally; GOOS=windows go vet ./... passes, and the new file tests build URLs from t.TempDir() so they exercise drive-letter paths on the Windows runner.
  • Observed (not changed): tight list items and code block lines get no per-line anchor; foo.md:N falls back to the nearest preceding anchor in the page script.

🤖 Generated with Claude Code

patakuti and others added 4 commits October 2, 2026 21:31
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Run tests on Ubuntu and Windows, with the race detector on Ubuntu
- Add gofmt check (make fmt-check) and format two unformatted files
- Add handler tests (local files, directories, home expansion, passthrough)
- Add auth middleware tests
- Add CI badge and document make test / fmt-check

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
filepath.Abs prepends the current drive to a rooted path without one, so use a real absolute path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@patakuti
patakuti merged commit fe3506b into main Oct 2, 2026
2 checks passed
@patakuti patakuti mentioned this pull request Oct 2, 2026
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