diff options
author | Josh Hoyt <josh@janrain.com> | 2006-01-03 18:43:19 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-01-03 18:43:19 +0000 |
commit | 06207967531e37025db090f5913b920383472c4d (patch) | |
tree | bb1354abc90b4a598eee55bb324ff471c4a3ddc4 /admin | |
parent | 43efaa896eab765bdc74da3d63e51fc1ab60e551 (diff) | |
download | php-openid-06207967531e37025db090f5913b920383472c4d.zip php-openid-06207967531e37025db090f5913b920383472c4d.tar.gz php-openid-06207967531e37025db090f5913b920383472c4d.tar.bz2 |
[project @ Add check at record time that no tabs get recorded]
Diffstat (limited to 'admin')
-rw-r--r-- | admin/notabs | 17 | ||||
-rw-r--r-- | admin/runtests | 27 |
2 files changed, 44 insertions, 0 deletions
diff --git a/admin/notabs b/admin/notabs new file mode 100644 index 0000000..554e4a2 --- /dev/null +++ b/admin/notabs @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +tabs=$(find ./ \( -name _darcs \) -prune -o \( -type f -a -name \*.php \) | + xargs egrep -l ' ' | sort) +allowed= + +if [ "$allowed" != "$tabs" ] + then + cat <<EOF 1>&2 +Found tabs in: +$tabs + +Tabs allowed in: +$allowed +EOF + exit 1 +fi + diff --git a/admin/runtests b/admin/runtests new file mode 100644 index 0000000..e6b036c --- /dev/null +++ b/admin/runtests @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +test_tabs () { + /usr/bin/env bash $(dirname "$0")/notabs +} + +test_php () { + /usr/bin/env php texttest.php +} + +tests="tabs php" + +failures= +for test_name in $tests + do + echo "Running test $test_name" 1>&2 + if ! eval "test_$test_name" + then + failures="$failures $test_name" + fi +done + +if [ ! -z "$failures" ] + then + echo "Failures in: $failures" 1>&2 + exit 1 +fi |