Background
Motivation for a problem or that which needs to be built.
Sophie aims to be portable and UNIX-conforming. The only sensible way to make sure this rule is never broken is to sit down and get the drudge-work, that is setting up testing, out of the way. This will also help merge pull requests easier and faster, along with improving the collaborative process of pull-requests.
Proposal
Blueprint to resolve or implement.
Unit Tests
Previous information in #4 Mock Repositories is a reading prerequisite to this section.
Within each test_dir_Vn
there needs to be a single unit_test
directory.
This directory that has multiple sophie_unit_n.config
s that test for single filter/feature success, where n is a natural, increasing number, starting from 0.
The configs are tested one by one, using a script, sophie_unit_tester
, to control both Sophie and control initialization of the directory for each test (in order to test filters like size
by writing to files, and mtime
by modifying files, etc).
Each unit test consists of
- writing a directory structure to the controlling script using commands like
touch
, mkdir
, etc.
- specifying a file to run Sophie with, writing the output to file.
- testing the output file for passing or failing values to determine if the unit test passed or failed.
- outputting unit test success/failure.
Every single feature/filter of a release should be tested.
For V1, we need:
As a guideline, if something is completely unconformant to our usage and documentation, we don't test it.