summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorJosh Hoyt <josh@janrain.com>2006-01-03 18:43:19 +0000
committerJosh Hoyt <josh@janrain.com>2006-01-03 18:43:19 +0000
commit06207967531e37025db090f5913b920383472c4d (patch)
treebb1354abc90b4a598eee55bb324ff471c4a3ddc4 /admin
parent43efaa896eab765bdc74da3d63e51fc1ab60e551 (diff)
downloadphp-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/notabs17
-rw-r--r--admin/runtests27
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