From cb09e2edac2e181cfda4ef6ed3302b18ec7906b8 Mon Sep 17 00:00:00 2001 From: Josh Hoyt Date: Sat, 28 Jan 2006 00:09:22 +0000 Subject: [project @ Added script to check that each file in the library will import] --- Tests/Auth/OpenID/Consumer.php | 1 + Tests/Auth/OpenID/Parse.php | 1 + Tests/Auth/OpenID/StoreTest.php | 1 + admin/checkimport | 5 +++++ admin/checkimports | 2 ++ admin/fixperms | 3 ++- admin/runtests | 9 +++++++-- 7 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 admin/checkimport create mode 100644 admin/checkimports diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php index 06cc3b6..9134876 100644 --- a/Tests/Auth/OpenID/Consumer.php +++ b/Tests/Auth/OpenID/Consumer.php @@ -19,6 +19,7 @@ require_once 'Auth/OpenID/Store/FileStore.php'; require_once 'Auth/OpenID/OIDUtil.php'; require_once 'Auth/OpenID/KVForm.php'; require_once 'Auth/OpenID/Consumer/Consumer.php'; +require_once 'PHPUnit.php'; class Auth_OpenID_TestConsumer extends Auth_OpenID_Consumer { /** diff --git a/Tests/Auth/OpenID/Parse.php b/Tests/Auth/OpenID/Parse.php index 65e9424..62990c3 100644 --- a/Tests/Auth/OpenID/Parse.php +++ b/Tests/Auth/OpenID/Parse.php @@ -15,6 +15,7 @@ require_once 'Tests/Auth/OpenID/Util.php'; require_once 'Auth/OpenID/Consumer/Parse.php'; +require_once 'PHPUnit.php'; class Tests_Auth_OpenID_Link extends PHPUnit_TestCase { function Tests_Auth_OpenID_Link($case) diff --git a/Tests/Auth/OpenID/StoreTest.php b/Tests/Auth/OpenID/StoreTest.php index aeacedc..32c9d14 100644 --- a/Tests/Auth/OpenID/StoreTest.php +++ b/Tests/Auth/OpenID/StoreTest.php @@ -19,6 +19,7 @@ require_once 'Auth/OpenID/Association.php'; require_once 'Auth/OpenID/CryptUtil.php'; require_once 'Auth/OpenID/OIDUtil.php'; +require_once 'PHPUnit.php'; /** * This is the host where the SQL stores' databases should be created diff --git a/admin/checkimport b/admin/checkimport new file mode 100644 index 0000000..18a0e39 --- /dev/null +++ b/admin/checkimport @@ -0,0 +1,5 @@ +#!/usr/bin/env php + \ No newline at end of file diff --git a/admin/checkimports b/admin/checkimports new file mode 100644 index 0000000..c4fa471 --- /dev/null +++ b/admin/checkimports @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +./admin/findphp | xargs -L 1 ./admin/checkimport \ No newline at end of file diff --git a/admin/fixperms b/admin/fixperms index 50bb7ff..ab857e2 100644 --- a/admin/fixperms +++ b/admin/fixperms @@ -1,3 +1,4 @@ #!/usr/bin/env bash chmod +x admin/makedoc.sh admin/docblocks admin/runtests admin/mathlib \ - admin/fixperms admin/prepare-release \ No newline at end of file + admin/fixperms admin/prepare-release admin/checkimport admin/checkimports \ + admin/findphp \ No newline at end of file diff --git a/admin/runtests b/admin/runtests index 6bcd772..9026a90 100644 --- a/admin/runtests +++ b/admin/runtests @@ -2,6 +2,10 @@ HERE=$(readlink --canonicalize $(dirname "$0")) +test_import () { + ./admin/checkimports +} + test_tabs () { /usr/bin/env bash "$HERE/notabs" } @@ -30,14 +34,15 @@ test_php () { /usr/bin/env php "$HERE/texttest.php" } -tests="tabs longlines nobadbraces nobadcase opentag docblocks php" +tests="tabs longlines nobadbraces nobadcase opentag docblocks php import" failures= # Run in repository root (parent of this directory) cd $(dirname "$HERE") -chmod +x ./admin/findphp +chmod +x ./admin/fixperms +./admin/fixperms for test_name in $tests do -- cgit v1.1