This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-core".

The branch, master has been updated
       via  0ee8437381a52f234b3ed4dcb247c8d8d63992be (commit)
      from  440456ad09c4fcb8ac79599c99bf520d073aeb15 (commit)


Summary of changes:
 test/runTestsAndCoverage.sh                  |    3 +++
 test/snap-core-testsuite.cabal               |    3 ++-
 test/suite/Snap/Internal/Http/Types/Tests.hs |   10 +++++++---
 3 files changed, 12 insertions(+), 4 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0ee8437381a52f234b3ed4dcb247c8d8d63992be
Author: Gregory Collins <[email protected]>
Date:   Sun Aug 15 13:53:12 2010 -0400

    testFormatLogTime should not depend on being GMT-0500!!!

diff --git a/test/runTestsAndCoverage.sh b/test/runTestsAndCoverage.sh
index 413d500..2e6ba77 100755
--- a/test/runTestsAndCoverage.sh
+++ b/test/runTestsAndCoverage.sh
@@ -4,6 +4,9 @@ set -e
 
 SUITE=./dist/build/testsuite/testsuite
 
+export LC_ALL=C
+export LANG=C
+
 rm -f testsuite.tix
 
 if [ ! -f $SUITE ]; then
diff --git a/test/snap-core-testsuite.cabal b/test/snap-core-testsuite.cabal
index d2b27dc..1e99c31 100644
--- a/test/snap-core-testsuite.cabal
+++ b/test/snap-core-testsuite.cabal
@@ -10,7 +10,7 @@ Flag debug
 Flag testsuite
   Description: Are we running the testsuite? Causes arguments to \"debug\" to
                be evaluated but not printed.
-  Default: False
+  Default: True
 
 Flag portable
   Description: Compile in cross-platform mode. No platform-specific code or
@@ -54,6 +54,7 @@ Executable testsuite
     old-locale,
     old-time,
     parallel >= 2.2 && <2.3,
+    regex-posix >= 0.94.4 && <0.95,
     test-framework >= 0.3.1 && <0.4,
     test-framework-hunit >= 0.2.5 && < 0.3,
     test-framework-quickcheck2 >= 0.2.6 && < 0.3,
diff --git a/test/suite/Snap/Internal/Http/Types/Tests.hs 
b/test/suite/Snap/Internal/Http/Types/Tests.hs
index bf5382e..8178bd0 100644
--- a/test/suite/Snap/Internal/Http/Types/Tests.hs
+++ b/test/suite/Snap/Internal/Http/Types/Tests.hs
@@ -5,7 +5,7 @@ module Snap.Internal.Http.Types.Tests
 
 import           Control.Monad
 import           Control.Parallel.Strategies
-import           Data.ByteString.Char8 ()
+import           Data.ByteString.Char8 (ByteString)
 import           Data.ByteString.Lazy.Char8 ()
 import           Data.IORef
 import           Data.Iteratee (stream2stream, run)
@@ -17,7 +17,7 @@ import           Prelude hiding (take)
 import           Test.Framework
 import           Test.Framework.Providers.HUnit
 import           Test.HUnit hiding (Test, path)
-
+import           Text.Regex.Posix
 
 import           Snap.Internal.Http.Types
 import           Snap.Iteratee (enumBS, fromWrap)
@@ -39,7 +39,11 @@ mkRq = do
 testFormatLogTime :: Test
 testFormatLogTime = testCase "formatLogTime" $ do
     b <- formatLogTime 3804938
-    assertEqual "formatLogTime" "13/Feb/1970:19:55:38 -0500" b
+
+    let re = ("^[0-9]{1,2}/[A-Za-z]{3}/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2} 
-[0-9]{4}$"
+                  :: ByteString)
+
+    assertBool "formatLogTime" $ b =~ re
 
 
 testAddHeader :: Test
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-core
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to