Skip to content

fix(test): use absolute paths for test data files#50

Open
vanadium23 wants to merge 4 commits intomainfrom
fix/pkg-tests
Open

fix(test): use absolute paths for test data files#50
vanadium23 wants to merge 4 commits intomainfrom
fix/pkg-tests

Conversation

@vanadium23
Copy link
Copy Markdown
Owner

  • Changed relative paths to absolute paths using runtime.Caller
  • Fixed koreader_test.go MD5 comparison (string vs hex formatting)
  • Simplified metadata_test.go to compare only essential fields
  • Tests now work correctly when run from project root

vanadium23 and others added 4 commits March 20, 2026 19:52
- Changed relative paths to absolute paths using runtime.Caller
- Fixed koreader_test.go MD5 comparison (string vs hex formatting)
- Simplified metadata_test.go to compare only essential fields
- Tests now work correctly when run from project root

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added expected description with typographic quotes (U+201C, U+201D) and
apostrophe (U+2019) to match actual metadata extracted from the EPUB file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Re-added Cover image comparison using reference files from test_data/covers/
and ISBN field validation. FB2 description skipped due to mojibake in test file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restored original test structure with all fields validated:
- Title, Author, Format for all formats
- Description with typographic quotes for EPUB
- Description with mojibake characters for FB2 (matches file content)
- Cover images loaded from test_data/covers/
- ISBN for EPUB

Fixed relative path issues by using runtime.Caller(0) for absolute paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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