summaryrefslogtreecommitdiff
path: root/tests/testboundaries.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testboundaries.c')
-rw-r--r--tests/testboundaries.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/testboundaries.c b/tests/testboundaries.c
index 895231ae..a405bd04 100644
--- a/tests/testboundaries.c
+++ b/tests/testboundaries.c
@@ -341,8 +341,16 @@ main (int argc,
char **argv)
{
gchar *text;
+ gchar *srcdir;
+ gchar *filename;
- if (!g_file_get_contents ("boundaries.utf8", &text, NULL, NULL))
+ srcdir = getenv ("srcdir");
+ if (!srcdir)
+ srcdir = ".";
+
+ filename = g_strdup_printf ("%s/boundaries.utf8", srcdir);
+
+ if (!g_file_get_contents (filename, &text, NULL, NULL))
fail ("Couldn't open sample text file");
check_invariants (text);