Improve scripts for 2005/giljade

Prompt to run test suite after the main feature is done and improve the
prompting. The test suite script gives a warning that it may take a bit
of time to run.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-21 09:48:36 -08:00
1 parent 4f089535b6
commit f72856c519
3 files changed
+22 -13

No files matched your search

+3
View File
@@ -24,6 +24,9 @@ EXIT_CODE=0
# delete temporary files first to make sure that they're clean
rm -f out out.count
echo "This may take a while: please be patient." 1>&2
echo 1>&2
# redirect stdout to 'out' so that we can run the test suite of giljade
./"$GILJADE" > out
# here we want to show only the lines matching the regexp '^Line' but write
+16 -10
View File
@@ -15,21 +15,27 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
read -r -p "Do you wish to run the test suite (y/n) ? "
if [[ "$REPLY" == "y" ]]; then
echo "$ make test" 1>&2
make test
fi
# We don't use tee(1) here so as to show better what we're doing and to prompt
# them to view the file with less(1) rather than dump it on them all at once.
echo 1>&2
read -r -n 1 -p "Press any key to run: ./giljade > out: "
echo 1>&2
echo "$ ./giljade > out" 1>&2
./giljade > out
echo 1>&2
echo "For this next step, make sure to keep pressing space (or hold it down) (q = quit)." 1>&2
echo "$ less -X out" 1>&2
read -r -n 1 -p "Press any key to continue: "
less -X out
read -r -n 1 -p "Press any key to run: less -rEXF out: "
less -rEXF out
echo 1>&2
echo "We've left the file 'out' for you in case you wish to open it in vi(m). If" 1>&2
echo "you do we recommend you try holding ctrl-f down in a similar way to how you held" 1>&2
echo "down space above. Of course you can open it in another editor if you wish." 1>&2
echo 1>&2
read -r -p "Do you wish to run the test suite (y/n) ? "
if [[ "$REPLY" == "y" || "$REPLY" = "Y" ]]; then
echo "$ make test" 1>&2
make test
fi