Skip to content

feat: establish eunit test suite with 29 tests#24

Merged
maennchen merged 2 commits intoerlef:mainfrom
Taure:feat/test-suite
Mar 13, 2026
Merged

feat: establish eunit test suite with 29 tests#24
maennchen merged 2 commits intoerlef:mainfrom
Taure:feat/test-suite

Conversation

@Taure
Copy link
Contributor

@Taure Taure commented Mar 13, 2026

Summary

  • Adds eunit tests for core logic modules: lock parsing, PURL conversion, dependency resolution, CLI options, and utility functions
  • Includes test fixtures (hex_only.lock, mixed.lock, empty.lock) covering hex, git, and git_subdir dependency types
  • Exports to_purl/1, resolve_dependency/3, version/1, and consult/1 under -ifdef(TEST) for testability
  • All 29 tests pass, formatting clean, xref and dialyzer clean

Test plan

  • rebar3 eunit — 29 tests, 0 failures
  • rebar3 fmt --check — clean
  • rebar3 xref — clean
  • rebar3 dialyzer — clean

Ref #13

@maennchen
Copy link
Member

@Taure Thanks for all the PRs.

We have a small issue with the REUSE license compliance check. Can you add a .license file for the lockfiles in your fixtures? (See https://github.com/erlef/rebar3-dependency-submission/blob/main/rebar.lock.license)

Taure added 2 commits March 13, 2026 16:27
Covers the core logic modules:
- rebar3_dependency_submission_rebar3: lock parsing, version extraction, consult
- rebar3_dependency_submission_snapshot: PURL conversion, dependency resolution
- rebar3_dependency_submission_options: CLI argument parsing, env var fallback
- rebar3_dependency_submission_common: to_binary, format_markdown

Includes test fixtures for hex-only, mixed (hex+git+git_subdir), and empty
lock files.

Ref erlef#13
@Taure Taure force-pushed the feat/test-suite branch from 13b0ab7 to eccea9d Compare March 13, 2026 15:31
@maennchen maennchen merged commit 259d3f9 into erlef:main Mar 13, 2026
1 of 2 checks passed
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.

2 participants