Rename test scripts in 1995/garry to try

This is to match the other entries (they also run more than one command
now).
This commit is contained in:
Cody Boone Ferguson committed 2023-11-25 09:48:37 -08:00
1 parent aabb60668a
commit 6eed1e8044
6 files changed
+68 -37

No files matched your search

+2 -6
View File
@@ -15,9 +15,7 @@ make all
### Try:
```sh
./garry.test.sh
./garry < README.md
./try.sh
```
@@ -46,9 +44,7 @@ make alt
### Alternate try:
```sh
GARRY=garry.alt ./garry.test.sh
./garry.alt < README.md
./try.alt.sh
```
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env sh
#
# garry.alt.test.sh - example of how to use garry.alt
EXAMPLEON="\33\133\61\73\67\155"
EXAMPLEOFF="\33\133\155"
DOLLAR="$"
export EXAMPLEON EXAMPLEOFF DOLLAR
# make sure alt code is built, first
make alt || exit 1
./garry.alt <garry.data
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env sh
#
# garry.test.sh - example of how to use garry
EXAMPLEON="\33\133\61\73\67\155"
EXAMPLEOFF="\33\133\155"
DOLLAR="$"
export EXAMPLEON EXAMPLEOFF DOLLAR
# make sure code is built, first
make all || exit 1
./garry <garry.data
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env sh
#
# try.alt.sh - demonstrate IOCCC winner 1995/garry alt code
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
# this way allows us to have the user specify a different compiler in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
make CC="$CC" alt >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "$ EXAMPLEON=\"\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\"$\"" 1>&2
EXAMPLEON="\33\133\61\73\67\155"
EXAMPLEOFF="\33\133\155"
DOLLAR="$"
export EXAMPLEON EXAMPLEOFF DOLLAR
read -r -n 1 -p "Press any key to run: ./garry.alt < garry.data | less (q = quit, space = next page): "
./garry.alt <garry.data | less -r -X
echo 1>&2
read -r -n 1 -p "Press any key to run: ./garry.alt < README.md | less (q = quit, space = next page): "
./garry.alt < README.md | less -X
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env sh
#
# try.sh - demonstrate IOCCC winner 1995/garry
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
# this way allows us to have the user specify a different compiler in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "$ EXAMPLEON=\"\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\"$\"" 1>&2
EXAMPLEON="\33\133\61\73\67\155"
EXAMPLEOFF="\33\133\155"
DOLLAR="$"
export EXAMPLEON EXAMPLEOFF DOLLAR
read -r -n 1 -p "Press any key to run: ./garry < garry.data | less (q = quit, space = next page): "
./garry <garry.data | less -r -X
echo 1>&2
read -r -n 1 -p "Press any key to run: ./garry < README.md | less (q = quit, space = next page): "
./garry < README.md | less -X