From 3c39daf7ad8ffeb274a58cad2cec53505f793056 Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Sun, 30 Jun 2024 09:29:10 +0200 Subject: [PATCH] Add a manual test suite --- README.md | 6 ++++++ manual-test.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 manual-test.sh diff --git a/README.md b/README.md index b3e985b..7d573c5 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/manual-test.sh b/manual-test.sh new file mode 100755 index 0000000..87ff773 --- /dev/null +++ b/manual-test.sh @@ -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