diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-06-07 21:10:44 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-06-07 21:10:44 -0400 |
commit | 8ac9fc7faeff8908448e9da09a43873e2e0fe376 (patch) | |
tree | d606ebdd62c150ebe7fa25e909ac1b24a567f0be /tests/testboundaries_ucd.c | |
parent | d489ad061d70526fc5f5cdae2273e9deabea6a17 (diff) | |
download | pango-8ac9fc7faeff8908448e9da09a43873e2e0fe376.tar.gz |
Avoid hard-dep on bleeding-edge GLib
If new test api is not available, do without it. In this
case, the tests won't work installed, but they should still
work uninstalled and in distcheck.
Diffstat (limited to 'tests/testboundaries_ucd.c')
-rw-r--r-- | tests/testboundaries_ucd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testboundaries_ucd.c b/tests/testboundaries_ucd.c index d9019c63..5a78406f 100644 --- a/tests/testboundaries_ucd.c +++ b/tests/testboundaries_ucd.c @@ -332,7 +332,11 @@ test_grapheme_break (void) const gchar *filename; AttrBits bits; +#if GLIB_CHECK_VERSION(2, 37, 2) filename = g_test_get_filename (G_TEST_DIST, "GraphemeBreakTest.txt", NULL); +#else + filename = SRCDIR "/GraphemeBreakTest.txt"; +#endif bits.bits = 0; bits.attr.is_cursor_position = 1; do_test (filename, bits, FALSE); @@ -344,7 +348,11 @@ test_word_break (void) const gchar *filename; AttrBits bits; +#if GLIB_CHECK_VERSION(2, 37, 2) filename = g_test_get_filename (G_TEST_DIST, "WordBreakTest.txt", NULL); +#else + filename = SRCDIR "/WordBreakTest.txt"; +#endif bits.bits = 0; bits.attr.is_word_boundary = 1; do_test (filename, bits, FALSE); @@ -356,7 +364,11 @@ test_sentence_break (void) const gchar *filename; AttrBits bits; +#if GLIB_CHECK_VERSION(2, 37, 2) filename = g_test_get_filename (G_TEST_DIST, "SentenceBreakTest.txt", NULL); +#else + filename = SRCDIR "/SentenceBreakTest.txt"; +#endif bits.bits = 0; bits.attr.is_sentence_boundary = 1; do_test (filename, bits, FALSE); @@ -368,7 +380,11 @@ test_line_break (void) const gchar *filename; AttrBits bits; +#if GLIB_CHECK_VERSION(2, 37, 2) filename = g_test_get_filename (G_TEST_DIST, "LineBreakTest.txt", NULL); +#else + filename = SRCDIR "/LineBreakTest.txt"; +#endif bits.bits = 0; bits.attr.is_line_break = 1; bits.attr.is_mandatory_break = 1; |