diff --git a/17-introspective/tf-17.py b/17-introspective/tf-17.py old mode 100644 new mode 100755 diff --git a/18-reflective/tf-18.py b/18-reflective/tf-18.py old mode 100644 new mode 100755 diff --git a/README.md b/README.md index 2c86e81..238c08d 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ Exercises in Programming Style ============================== -Comprehensive collection of well-known, and not so well-known, programming styles using a simple computational task, term frequency. +Comprehensive collection of well-known, and not so well-known, programming +styles using a simple computational task, term frequency. Additions are welcome! You can contribute: -- an example program that follows one of the existing styles, but written in a different programming language +- an example program that follows one of the existing styles, but written in a + different programming language - an entirely new programming style - new names for the existing styles - discussion of names, pros and cons of each style @@ -32,6 +34,14 @@ should not be here) Contributions of new names and discussion should be done under Issues or on the Wiki part of this repo. +To test your work, make sure your script is executable and then run: + +``` +./test/test.sh NN +``` + +Where `NN` is the number prefix of the directory you're adding. + Never stop exercising! Love, diff --git a/test/test.sh b/test/test.sh index ff7d1c9..1cf2753 100755 --- a/test/test.sh +++ b/test/test.sh @@ -4,11 +4,21 @@ function msg() { echo $(date +%T) "$@" } +# Move to a predictable place. +cd $(dirname $0) + failures=0 total=0 -mydir=$(cd $(dirname $0); pwd) +mydir=$(pwd) +if [ -z "$1" ]; then + styles_to_test=$(echo ../[0-9][0-9]-*) +else + styles_to_test=../$1-* +fi + files=$(echo *.txt) -for dir in ../[0-9][0-9]-* ; do + +for dir in $styles_to_test ; do cd $dir for file in $files ; do for exe in * ; do