mirror of
https://github.com/JotaRandom/hfsutils.git
synced 2026-01-26 06:16:44 +00:00
HFS/HFS+ Utilities Test Suite
This directory contains tests for the HFS/HFS+ filesystem utilities.
Test Structure
tests/
├── unit/ # Unit tests for individual components
├── integration/ # Integration tests for complete workflows
├── fixtures/ # Test data and sample filesystems
├── scripts/ # Test automation scripts
└── README.md # This file
Running Tests
Unit Tests
make test-unit
Integration Tests
make test-integration
All Tests
make test
Test Categories
Unit Tests
unit/mkfs/- Tests for mkfs.hfs and mkfs.hfs+ functionalityunit/fsck/- Tests for fsck.hfs and fsck.hfs+ functionalityunit/shared/- Tests for shared utility functions
Integration Tests
integration/mkfs/- End-to-end mkfs testingintegration/fsck/- End-to-end fsck testingintegration/workflows/- Complete filesystem workflows
Test Fixtures
fixtures/images/- Sample HFS/HFS+ filesystem imagesfixtures/data/- Test data filesfixtures/configs/- Test configuration files
Test Requirements
- Linux system with loop device support
- Root privileges for some tests (filesystem creation/mounting)
- At least 100MB free disk space for test images
Writing Tests
Tests should follow these conventions:
- Use descriptive test names
- Include both positive and negative test cases
- Clean up resources after test completion
- Document expected behavior and edge cases