Use dedicated data files, and install them. As usual, to run the test binary by hand, you will need to set G_TEST_SRCDIR.