diff options
author | Joe Crayne <joe@jerkface.net> | 2019-06-11 01:02:56 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-06-11 01:10:22 -0400 |
commit | 254c7813344075b6a2c915d9724a5e7a18091b87 (patch) | |
tree | 1e817f71bd1034377f44092e360def575e2dafc3 /test/TestSabadie.hs | |
parent | 6fddb0f2c9f60714089389350e001f6f765d2405 (diff) |
Added failing tests.
Diffstat (limited to 'test/TestSabadie.hs')
-rw-r--r-- | test/TestSabadie.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/TestSabadie.hs b/test/TestSabadie.hs new file mode 100644 index 0000000..a01693b --- /dev/null +++ b/test/TestSabadie.hs | |||
@@ -0,0 +1,19 @@ | |||
1 | module TestSabadie where | ||
2 | |||
3 | import Codec.Wavefront | ||
4 | import System.Directory | ||
5 | import System.IO | ||
6 | |||
7 | getDataDir :: IO FilePath | ||
8 | getDataDir = do | ||
9 | let tryDir d fallback = do | ||
10 | found <- doesDirectoryExist d | ||
11 | if found then return d else fallback | ||
12 | tryDir "./test-data" $ tryDir "../test-data" (return ".") | ||
13 | |||
14 | main = do | ||
15 | ddir <- getDataDir | ||
16 | r1 <- fromFile (ddir ++ "/01.obj") | ||
17 | print r1 | ||
18 | -- Failed: ` vp ` [...]: Failed reading: empty | ||
19 | -- Reason: vp token and blank lines | ||