Improve test script (now scripts) for 1995/garry
Added alt test script to use alt code (though in this case it has no real use other than to be complete). It makes sure to compile the alt code before trying to use it, exiting if it fails. The original test script now also makes sure to compile the program before use, exiting if it fails. I also fixed the thanks file with this: I didn't fix the main entry; that already compiled. I had fixed the alt code which did not compile (partly because I agreed with the judges that it looked like a rat dumping core). Why an alt test script instead of just adding an environmental variable like I did with others? Because it felt like it'd be easier to type. It might be that I end up doing this with the scripts I added a way to specify the program, when I come across it, if it seems worth it (which for some it might very well be worth it).
This commit is contained in:
1 parent
37c9908519
commit
cfca178b14
3 files changed
+36
-7
No files matched your search
+17
-2
@@ -35,13 +35,28 @@ judges noted that the C pre-processed version (with the `#include`s
|
||||
left intact) looked very much like a rat "dropping core". See
|
||||
[garry.alt.c](garry.alt.c) and judge for yourself!
|
||||
|
||||
To use try:
|
||||
#### To build:
|
||||
|
||||
|
||||
```sh
|
||||
make alt
|
||||
```
|
||||
|
||||
Use `garry.alt` as you would `garry` above.
|
||||
#### To use:
|
||||
|
||||
```sh
|
||||
./garry.alt <input_file >output_file
|
||||
```
|
||||
|
||||
#### Try:
|
||||
|
||||
```sh
|
||||
|
||||
GARRY=garry.alt ./garry.test.sh
|
||||
|
||||
./garry.alt < README.md
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
# garry.test - example of how to use garry
|
||||
# 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
|
||||
+15
-4
@@ -1148,10 +1148,21 @@ there is such a thing anyway :-) ). See the README.md for details on this.
|
||||
|
||||
## [1995/garry](1995/garry/garry.c) ([README.md](1995/garry/README.md]))
|
||||
|
||||
Cody fixed this so that it will compile with modern compilers. The problem was a
|
||||
missing `int` for the `f` variable. He felt it was even more important that it
|
||||
works because the layout does indeed look to him like a rat is dropping core :-),
|
||||
something that the judges suggested.
|
||||
Cody fixed the alt code so that it will compile with modern compilers. The
|
||||
problem was a missing `int` for the `f` variable. He felt it was even more
|
||||
important that it works because the layout does indeed look to him like a rat is
|
||||
dropping core :-), something that the judges suggested.
|
||||
|
||||
Cody also improved the script [garry.test.sh](1995/garry/garry.test.sh) to make
|
||||
sure the program is compiled before trying to use it and he also added the
|
||||
[garry.alt.test.sh](1995/garry/garry.alt.test.sh) script to use the alt version,
|
||||
though the alt version is not as important as alt code in other entries.
|
||||
|
||||
The reason the alt script was added rather than using an environmental variable
|
||||
to specify which one to use is to make it easier on the user as typing
|
||||
`GARRY=garry.alt ./garry.test.sh` is not as simple (even though simple) as just
|
||||
running `./garry.alt.test.sh`.
|
||||
|
||||
|
||||
## [1995/makarios](1995/makarios/makarios.c) ([README.md](1995/makarios/README.md))
|
||||
|
||||
|
||||
Reference in new issue
Block a user