Skip to content

Add unit tests and CI workflow - #1

Merged
adibsaad merged 2 commits into
mainfrom
add-ci-and-tests
Sep 12, 2026
Merged

adibsaad merged 2 commits into
mainfrom
add-ci-and-tests

Conversation

@adibsaad

Copy link
Copy Markdown
Owner

Summary

  • Unit tests (cargo test, 18 passing) covering the pure logic and UX invariants:
    • proc_name basename extraction + fallback, parse_cpu_time (BSD + procps formats)
    • matches multi-term AND + smart-case; basename/pid-only search semantics
    • build_children, walk_tree (exact connector rendering), build_search (cycles safe)
    • filtering shows matches with ancestors as context, cursor lands on first killable row and clamps at bounds
    • protected rows refuse selection; selection view lists selected + ancestors and self-exits when empty
    • kill_targets skips protected selections and falls back to the cursor row
  • Applied cargo fmt (mechanical reformat)
  • CI workflow: fmt --check + clippy -D warnings + test on ubuntu and macos, for pushes to main and all PRs

Deliberately untested

  • fetch() (shells out to live ps) and do_kill() (fires real SIGKILLs)

@adibsaad
adibsaad merged commit 7c56d13 into main Sep 12, 2026
2 checks passed
@adibsaad
adibsaad deleted the add-ci-and-tests branch September 12, 2026 16:18
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