Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

The private/file-group.rkt module had only one test covering expand-modified-line-set, leaving most code paths untested.

Added Tests (24 new, 25 total)

  • Struct constructors and predicates: file-portion, single-file-group, directory-file-group, package-file-group, git-repository-file-group
  • File resolution:
    • Single file groups with range sets
    • Directory groups with .rkt filtering (non-.rkt files excluded)
    • Package groups using installed packages (e.g., rackunit)
    • Git repository groups with uncommitted changes detection
  • Group aggregation: file-groups-resolve combining multiple groups and merging ranges for duplicate files
  • Helper functions: rkt-file? extension filtering, range-bound-map for bounded/unbounded ranges

Tests use temporary directories/files in /tmp and clean up after themselves. Git tests configure user identity locally and verify command success.

(test-case "file-group-resolve returns only .rkt files"
  (define test-dir (make-temporary-file "resyntax-test-~a" 'directory))
  (define rkt-file1 (build-path test-dir "test1.rkt"))
  (define txt-file (build-path test-dir "test.txt"))
  ;; Only test1.rkt and test2.rkt are returned, test.txt is filtered out
  (define portions (file-group-resolve (directory-file-group test-dir)))
  (check-equal? (length portions) 2))
Original prompt

This section details on the original issue you should resolve

<issue_title>File group code has poor coverage</issue_title>
<issue_description>The private/file-group.rkt file has very poor test coverage. This should be fixable with some tests that create directories, files, and git repositories in a /tmp directory.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add tests to improve coverage for file group code Add comprehensive tests for private/file-group.rkt Oct 29, 2025
Copilot AI requested a review from jackfirth October 29, 2025 09:11
@jackfirth jackfirth marked this pull request as ready for review October 29, 2025 09:36
Copilot AI and others added 3 commits October 29, 2025 03:02
Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
@jackfirth jackfirth force-pushed the copilot/improve-test-coverage-file-group branch from 368388e to bc1c0e0 Compare October 29, 2025 10:02
@coveralls
Copy link

Pull Request Test Coverage Report for Build #63

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 93.744%

Totals Coverage Status
Change from base Build #62: 0.4%
Covered Lines: 14476
Relevant Lines: 15442

💛 - Coveralls

@jackfirth jackfirth merged commit 8b9e10b into master Oct 29, 2025
8 checks passed
@jackfirth jackfirth deleted the copilot/improve-test-coverage-file-group branch October 29, 2025 20:49
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.

File group code has poor coverage

3 participants