mirror of
https://github.com/walles/moar.git
synced 2024-11-21 16:04:20 +03:00
Add a manual test suite
This commit is contained in:
parent
3543b2ca5f
commit
3c39daf7ad
@ -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).
|
||||
|
||||
|
38
manual-test.sh
Executable file
38
manual-test.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user