summaryrefslogtreecommitdiff
path: root/test/TestSundqvist.hs
blob: 935368aade4687bda52f15e5dc6610bc6c0269d6 (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: vp token,and blank lines