summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2006-01-05 19:22:31 +0000
committertailor <cygnus@janrain.com>2006-01-05 19:22:31 +0000
commitee8ed8a31412c3565ae7d11bba70fec60b08f0e9 (patch)
treea81a3e74e1aa4fbf59aac4cd370086b6093ddb36 /admin
parentd390709324e5df794b9ff6ce12ce88136544b1c7 (diff)
downloadphp-openid-ee8ed8a31412c3565ae7d11bba70fec60b08f0e9.zip
php-openid-ee8ed8a31412c3565ae7d11bba70fec60b08f0e9.tar.gz
php-openid-ee8ed8a31412c3565ae7d11bba70fec60b08f0e9.tar.bz2
[project @ Added script to check the case of null, true, and false tokens]
Diffstat (limited to 'admin')
-rw-r--r--admin/nobadcase40
-rw-r--r--admin/runtests6
2 files changed, 45 insertions, 1 deletions
diff --git a/admin/nobadcase b/admin/nobadcase
new file mode 100644
index 0000000..e34aa4e
--- /dev/null
+++ b/admin/nobadcase
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+bad_true=$(grep -l "TRUE" $(find Net Tests -name \*.php | grep -v darcs))
+bad_false=$(grep -l "FALSE" $(find Net Tests -name \*.php | grep -v darcs))
+bad_null=$(grep -l "NULL" $(find Net Tests -name \*.php | grep -v darcs))
+
+if [ "$bad_true" ]
+ then
+ cat <<EOF 1>&2
+These files contain TRUE tokens:
+
+$bad_true
+
+EOF
+fi
+
+if [ "$bad_false" ]
+ then
+ cat <<EOF 1>&2
+These files contain FALSE tokens:
+
+$bad_false
+
+EOF
+fi
+
+if [ "$bad_null" ]
+ then
+ cat <<EOF 1>&2
+These files contain NULL tokens:
+
+$bad_null
+
+EOF
+fi
+
+if [[ "$bad_true" || "$bad_false" || "$bad_null" ]]
+ then
+ exit 1
+fi
diff --git a/admin/runtests b/admin/runtests
index ee8ebcd..8d1b7f2 100644
--- a/admin/runtests
+++ b/admin/runtests
@@ -12,11 +12,15 @@ test_nobadbraces () {
/usr/bin/env bash $(dirname "$0")/nobadbraces
}
+test_nobadcase () {
+ /usr/bin/env bash $(dirname "$0")/nobadcase
+}
+
test_php () {
/usr/bin/env php texttest.php
}
-tests="tabs longlines nobadbraces php"
+tests="tabs longlines nobadbraces nobadcase php"
failures=
for test_name in $tests