[gtksourceview/wip/uchardet] tests: don't try to detect small chunks with uchardet...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/uchardet] tests: don't try to detect small chunks with uchardet...
- Date: Sat, 28 Nov 2015 18:40:54 +0000 (UTC)
commit 5e95c6a4b290d6f3c0ae32eb9ac5696eac5c4d59
Author: Jehan <jehan girinstud io>
Date: Sat Nov 28 18:08:34 2015 +0100
tests: don't try to detect small chunks with uchardet...
... when test data starts with ASCII characters.
uchardet returns ASCII, perfectly valid response.
tests/test-buffer-output-stream.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-buffer-output-stream.c b/tests/test-buffer-output-stream.c
index bac10cf..ed78c67 100644
--- a/tests/test-buffer-output-stream.c
+++ b/tests/test-buffer-output-stream.c
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <glib.h>
#include <glib/gprintf.h>
#include <gtk/gtk.h>
@@ -313,10 +317,12 @@ test_utf8_utf8 (void)
g_assert_cmpstr (aux, ==, "foobar\xc3\xa8\xc3\xa8\xc3\xa8zzzzzz");
g_free (aux);
- /* small chunk */
+#ifndef WITH_UCHARDET
+ /* small chunk but not with uchardet */
aux = do_test ("foobar\xc3\xa8\xc3\xa8\xc3\xa8zzzzzz", "UTF-8", NULL, 18, 2, NULL);
g_assert_cmpstr (aux, ==, "foobar\xc3\xa8\xc3\xa8\xc3\xa8zzzzzz");
g_free (aux);
+#endif
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]