1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sw=4 et tw=99:
7 BEGIN_TEST(testUTF8_bug589917)
9 const jschar surrogate_pair[] = { 0xd800, 0xdc00 };
10 char output_buffer[10];
11 size_t utf8_len = sizeof(output_buffer);
13 CHECK(JS_EncodeCharacters(cx, surrogate_pair, 2, output_buffer, &utf8_len));
16 CHECK(JS_EncodeCharacters(cx, surrogate_pair, 2, NULL, &utf8_len));
21 END_TEST(testUTF8_bug589917)