Graham Berks | 9 May 07:55 2013

Accessing resource files in tests

Hi, whats the recommended way to access a resource file for a test within cabal.

I have a text file containing data that I use in a test and want to be able to access it in a root path independent manner.

Thanks
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Sturdy, Ian | 9 May 17:58 2013

Re: Accessing resource files in tests

If you are running the tests from cabal, they will always be started in the directory with the .cabal file, and relative paths from there are fine. If that is not the case, could you provide more details about how you are running the test?

Ian R. Sturdy
From: haskell-cafe-bounces <at> haskell.org [haskell-cafe-bounces <at> haskell.org] on behalf of Graham Berks [graham <at> fatlazycat.com]
Sent: Thursday, May 09, 2013 1:55 AM
To: haskell-cafe <at> haskell.org
Subject: [Haskell-cafe] Accessing resource files in tests

Hi, whats the recommended way to access a resource file for a test within cabal.

I have a text file containing data that I use in a test and want to be able to access it in a root path independent manner.

Thanks
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane