1ff636
From c49cced2ef923522398695531363de2eb3940273 Mon Sep 17 00:00:00 2001
1ff636
From: Tom Gundersen <teg@jklm.no>
1ff636
Date: Wed, 18 Feb 2015 14:33:50 +0100
1ff636
Subject: [PATCH] test: utf8 - fix utf16 tests on BE machines
1ff636
1ff636
(cherry picked from commit 502184de0f95d3a124d4d4c77ae7a88747a0fac2)
1ff636
---
1ff636
 src/test/test-utf8.c | 2 +-
1ff636
 1 file changed, 1 insertion(+), 1 deletion(-)
1ff636
1ff636
diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
Pablo Greco 48fc63
index befa385754..346f8524c6 100644
1ff636
--- a/src/test/test-utf8.c
1ff636
+++ b/src/test/test-utf8.c
1ff636
@@ -95,7 +95,7 @@ static void test_utf8_escaping_printable(void) {
1ff636
 
1ff636
 static void test_utf16_to_utf8(void) {
1ff636
         char *a = NULL;
1ff636
-        const uint16_t utf16[] = { 'a', 0xd800, 'b', 0xdc00, 'c', 0xd801, 0xdc37 };
1ff636
+        const uint16_t utf16[] = { htole16('a'), htole16(0xd800), htole16('b'), htole16(0xdc00), htole16('c'), htole16(0xd801), htole16(0xdc37) };
1ff636
         const char utf8[] = { 'a', 'b', 'c', 0xf0, 0x90, 0x90, 0xb7, 0 };
1ff636
 
1ff636
         a = utf16_to_utf8(utf16, 14);