summaryrefslogtreecommitdiff
path: root/test/TestSabadie.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/TestSabadie.hs')
-rw-r--r--test/TestSabadie.hs19
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 @@
1module TestSabadie where
2
3import Codec.Wavefront
4import System.Directory
5import System.IO
6
7getDataDir :: IO FilePath
8getDataDir = 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
14main = 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