systab/demo/quickstart.tape
Matthias Johnson 6e2aaf99f6 Fix VHS quoting and make tape test runner Hide-aware
Sequential cleanup commands fixed the VHS parse error but exposed
a deeper issue: the test runner was blind to Hide/Show blocks,
so cleanup commands ran as tests and could delete jobs mid-sequence.

- test-tapes.sh now reads tapes line-by-line tracking Hide/Show state;
  only Type lines in visible (Show) blocks are executed as tests
- Pre-clean named jobs from each tape at start of run_tape to handle
  leftovers from previously failed runs (mirrors what the Hide cleanup
  does when VHS records the tape)
- 19 tape commands tested (cleanup commands correctly excluded)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 01:58:25 -07:00

99 lines
1.6 KiB
VHS

# systab — Quick Start
# Create a timer, create a service, then use edit mode to add a new job.
Output demo/quickstart.gif
Set Shell bash
Set Width 1200
Set Height 600
Set FontSize 16
Set TypingSpeed 50ms
Sleep 1s
# Clean up any pre-existing jobs with names used in this demo
Hide
Type "systab -X healthcheck_home 2>/dev/null; systab -X monitor_home 2>/dev/null; systab -X diskcheck_home 2>/dev/null; true"
Enter
Sleep 1s
Show
# Create a recurring timer
Hide
Type "./demo/note.sh 'Create a recurring timer'"
Enter
Sleep 500ms
Show
Sleep 1s
Type "systab -t 'every 5 minutes' -n healthcheck_home -c 'uptime'"
Sleep 500ms
Enter
Sleep 2s
# Create a persistent service
Hide
Type "./demo/note.sh 'Create a persistent service'"
Enter
Sleep 500ms
Show
Sleep 1s
Type "systab -s -n monitor_home -c 'ping -c 1 localhost'"
Sleep 500ms
Enter
Sleep 2s
# Both visible in status
Hide
Type "./demo/note.sh 'Both jobs visible in status'"
Enter
Sleep 500ms
Show
Sleep 1s
Type "systab -S"
Sleep 500ms
Enter
Sleep 2s
# Open edit mode: screenshot then add a new job
Hide
Type "./demo/note.sh 'Edit mode — add a new job'"
Enter
Sleep 500ms
Show
Sleep 1s
Type "EDITOR=nano systab -e"
Sleep 500ms
Enter
Sleep 3s
Screenshot demo/editmode.png
# Navigate to end of file in nano and add a new job
Ctrl+V
Sleep 500ms
Down 5
Sleep 500ms
Type "new:n=diskcheck_home | daily | df -h"
Enter
Sleep 500ms
Ctrl+O
Sleep 500ms
Enter
Sleep 500ms
Ctrl+X
Sleep 3s
# Show updated status
Hide
Type "./demo/note.sh 'Status after edit — new job added'"
Enter
Sleep 500ms
Show
Sleep 1s
Type "systab -S"
Sleep 500ms
Enter
Sleep 2s
Sleep 2s