summaryrefslogtreecommitdiff
path: root/test/TestSundqvist.hs
blob: bfcad6b84b72cd224ae13bf63a8b68954083791f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module TestSundqvist where


import Graphics.WaveFront
import Graphics.WaveFront.Load as Load
import System.Directory
import System.IO

getDataDir :: IO FilePath
getDataDir = do
    let tryDir d fallback = do
            found <- doesDirectoryExist d
            if found then return d else fallback
    tryDir "./test-data" $ tryDir "../test-data" (return ".")

main = do
    ddir <- getDataDir
    r1 <- Load.obj (ddir ++ "/01.obj")
    print r1
    -- Failed: endOfInput
    -- Reason: vt has 3 components instead of 2.