-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmanual-test.sh
executable file
·38 lines (30 loc) · 1.04 KB
/
manual-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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