File: test001-list-dir-contents.hs

package info (click to toggle)
haskell-hinotify 0.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 116 kB
  • sloc: haskell: 245; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Main where

import Control.Monad

import System.Directory

import System.INotify as INotify

import Utils

main :: IO ()
main =
    inTestEnviron [Open, Close] getDirectoryContents $ \ events -> do
        when (expected ~= events)
            testSuccess
        putStrLn $ explainFailure expected events
        testFailure

expected :: [Event]
expected =
    [ Opened True Nothing
    , Closed True Nothing False
    ]