diff options
author | tailor <cygnus@janrain.com> | 2006-01-05 00:41:42 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-01-05 00:41:42 +0000 |
commit | 98eba54f8edd13044ebce95e56af15f9a8b5c332 (patch) | |
tree | cdd987a0d9b04091e59875af1a4ea4c67cb4d29b | |
parent | 4d0c7eaf3563c5f1412825e94e8294c86de5a899 (diff) | |
download | php-openid-98eba54f8edd13044ebce95e56af15f9a8b5c332.zip php-openid-98eba54f8edd13044ebce95e56af15f9a8b5c332.tar.gz php-openid-98eba54f8edd13044ebce95e56af15f9a8b5c332.tar.bz2 |
[project @ Added brace style checking script to runtests]
-rw-r--r-- | admin/nobadbraces | 13 | ||||
-rw-r--r-- | admin/otb_test.php | 20 | ||||
-rw-r--r-- | admin/runtests | 6 |
3 files changed, 38 insertions, 1 deletions
diff --git a/admin/nobadbraces b/admin/nobadbraces new file mode 100644 index 0000000..18f96c3 --- /dev/null +++ b/admin/nobadbraces @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +bad_functions=$(find Net Tests -name \*.php | + xargs -l1 -I FILENAME /usr/bin/env perl admin/brace_style.pl FILENAME) + +if [ "$bad_functions" ] + then + cat <<EOF 1>&2 +$bad_functions +EOF + exit 1 +fi + diff --git a/admin/otb_test.php b/admin/otb_test.php new file mode 100644 index 0000000..b2fc99f --- /dev/null +++ b/admin/otb_test.php @@ -0,0 +1,20 @@ +<?php + +function fail1() { +} + +function pass1() +{ +} + +function fail2( + ) { + +} + +function pass2( + ) +{ +} + +?>
\ No newline at end of file diff --git a/admin/runtests b/admin/runtests index 0a65226..ee8ebcd 100644 --- a/admin/runtests +++ b/admin/runtests @@ -8,11 +8,15 @@ test_longlines () { /usr/bin/env bash $(dirname "$0")/nolonglines } +test_nobadbraces () { + /usr/bin/env bash $(dirname "$0")/nobadbraces +} + test_php () { /usr/bin/env php texttest.php } -tests="tabs longlines php" +tests="tabs longlines nobadbraces php" failures= for test_name in $tests |