2import Control.Exception (bracket)
3import Control.Monad (when)
4import System.Exit (exitFailure)
10tests :: [TestEnv -> Test]
12 [ TestLabel "Bytea" . testBytea
13 , TestLabel "Notify" . testNotify
16-- | Action for connecting to the database that will be used for testing.
18-- Note that some tests, such as Notify, use multiple connections, and assume
19-- that 'testConnect' connects to the same database every time it is called.
20testConnect :: IO Connection
21testConnect = connectPostgreSQL ""
23withTestEnv :: (TestEnv -> IO a) -> IO a
31 withConn = bracket testConnect close
35 mapM_ (`hSetBuffering` LineBuffering) [stdout, stderr]
36 Counts{cases, tried, errors, failures} <-
37 withTestEnv $ \env -> runTestTT $ TestList $ map ($ env) tests
38 when (cases /= tried || errors /= 0 || failures /= 0) $ exitFailure
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list