I have some data files that only belong with my test program and would be confusing to distribute with the main library.
Unfortunately, the .cabal data-files
field only applies to an entire cabal file, not a single section like the test-suite
. If I try to use it in a test-suite stanza I just get:
Warning: ssh.cabal: Unknown fields: data-files (line 71)
Is there a natural way to associate these files with my test program so that they get copied around only if --enable-tests
is specified?
If there's no better way I'll probably use Template Haskell to embed them into the executable and then write them out again at runtime or something like that, but it feels pretty ugly.