| Index: third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp b/third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1740951e465f9bf6463fb92a6bada0d668017f00
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/wtf/text/TextCodecICUTest.cpp
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "wtf/text/TextCodecICU.h"
|
| +
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +#include "wtf/text/CharacterNames.h"
|
| +
|
| +namespace WTF {
|
| +
|
| +TEST(TextCodecICUTest, IgnorableCodePoint)
|
| +{
|
| + TextEncoding iso2022jp("iso-2022-jp");
|
| + std::unique_ptr<TextCodec> codec = TextCodecICU::create(iso2022jp, nullptr);
|
| + Vector<UChar> source;
|
| + source.append('a');
|
| + source.append(zeroWidthJoinerCharacter);
|
| + CString encoded = codec->encode(source.data(), source.size(), EntitiesForUnencodables);
|
| + EXPECT_STREQ("a‍", encoded.data());
|
| +}
|
| +
|
| +}
|
|
|