packages feed

hinotify-bytestring-0.3.8.1: tests/test001-list-dir-contents.hs

module Main where

import Control.Monad

import System.INotify

import qualified System.Posix.Directory.Traversals as PT

import Utils


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


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