aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson/ut/yson_ut.cpp
blob: b381bbabb8c9017ed340a492d5f17c3d98af99c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <library/cpp/yson/parser.h>
#include <library/cpp/yson/writer.h>

#include <library/cpp/testing/gtest/gtest.h>

#include <util/stream/mem.h>

using namespace NYson;

TEST(TTestYson, YT_17658)
{
   const auto data = TStringBuf{"\x01\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc\xcc"};

    auto input = TMemoryInput{data};

    TStringStream out;
    {
        TYsonWriter writer(&out, EYsonFormat::Text);
        EXPECT_THROW(ParseYsonStringBuffer(data, &writer), std::exception);
    }
}