tests/fdReadBuf001: Add some debug output
authorBen Gamari <ben@smart-cactus.org>
Tue, 1 Aug 2017 15:10:14 +0000 (11:10 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 1 Aug 2017 15:10:14 +0000 (11:10 -0400)
tests/fdReadBuf001.hs

index 4c121a2..f987c94 100644 (file)
@@ -21,7 +21,7 @@ main = do
            r <- fdReadBuf rd p block
            let (chunk,rest) = splitAt (fromIntegral r) text
            chars <- peekArray (fromIntegral r) p
-           when (chars /= chunk) $ error "mismatch"
+           when (chars /= chunk) $ error $ "mismatch: expected="++show chunk++", found="++show chars
            when (null rest) $ exitWith ExitSuccess
            loop rest
     loop bytes