Skip to content

Commit

Permalink
Add a manual test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Jun 30, 2024
1 parent 3543b2c commit 3c39daf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ Run tests:
./test.sh
```

Launch the manual test suite:

```bash
./manual-test.sh
```

To run tests in 32 bit mode, either do `GOARCH=386 ./test.sh` if you're on
Linux, or `docker build . -f Dockerfile-test-386` (tested on macOS).

Expand Down
38 changes: 38 additions & 0 deletions manual-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -e -o pipefail

# Test all permutations of the following:
# - Read from file vs from stdin
# - 'q' to quit vs 'v' to launch an editor
# - Terminal editor (nano) or GUI editor (code -w)

read -r -p "Press enter to start testing, then q to exit the pager"
clear
# With --trace we always get a non-zero exit code
./moar.sh --trace moar.sh || true

echo
read -r -p "Press enter to continue, then q to exit the pager"
clear
./moar.sh --trace <moar.sh || true

echo
read -r -p "Press enter to continue, then v to launch a terminal editor, then exit that"
clear
EDITOR=nano ./moar.sh --trace moar.sh || true

echo
read -r -p "Press enter to continue, then v to launch a terminal editor, then exit that"
clear
EDITOR=nano ./moar.sh --trace <moar.sh || true

echo
read -r -p "Press enter to continue, then v to launch a GUI editor, then exit that"
clear
EDITOR="code -w" ./moar.sh --trace moar.sh || true

echo
read -r -p "Press enter to continue, then v to launch a GUI editor, then exit that"
clear
EDITOR="code -w" ./moar.sh --trace <moar.sh || true

0 comments on commit 3c39daf

Please sign in to comment.