Add automated test suite for systab
44 tests covering job creation, status, logs, pause/resume, notifications, time format parsing, error cases, and cleanup. Tests run against real systemd user timers with automatic cleanup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
32ac2c3d5f
commit
d19709dc1f
2 changed files with 320 additions and 7 deletions
10
CLAUDE.md
10
CLAUDE.md
|
|
@ -31,16 +31,12 @@ Key functions: `parse_time` (time spec → OnCalendar), `_write_unit_files` (sha
|
|||
|
||||
## Testing
|
||||
|
||||
There are no automated tests. Test manually with systemd user timers:
|
||||
```bash
|
||||
./systab -t "every 5 minutes" -c "echo test"
|
||||
./systab -S
|
||||
./systab -L
|
||||
./systab -P <id>
|
||||
./systab -R <id>
|
||||
./systab -C
|
||||
./test.sh
|
||||
```
|
||||
|
||||
Runs 44 tests against real systemd user timers covering job creation, status, logs, pause/resume, notifications, time format parsing, error cases, and cleanup. All test jobs are cleaned up automatically via trap.
|
||||
|
||||
## Notes
|
||||
|
||||
- ShellCheck can be used for linting: `shellcheck systab`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue