-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |