Add test case for issue #387
This commit is contained in:
parent
6373219de7
commit
1567795d05
@ -55,6 +55,26 @@ TEST(LoadNodeTest, Binary) {
|
|||||||
node[1].as<Binary>());
|
node[1].as<Binary>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(LoadNodeTest, BinaryWithWhitespaces) {
|
||||||
|
Node node = Load(
|
||||||
|
"binaryText: !binary |-\n"
|
||||||
|
" TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieS\n"
|
||||||
|
" B0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIG\n"
|
||||||
|
" x1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbi\n"
|
||||||
|
" B0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZG\n"
|
||||||
|
" dlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS\n"
|
||||||
|
" 4K");
|
||||||
|
EXPECT_EQ(Binary(reinterpret_cast<const unsigned char*>(
|
||||||
|
"Man is distinguished, not only by his reason, "
|
||||||
|
"but by this singular passion from other "
|
||||||
|
"animals, which is a lust of the mind, that by "
|
||||||
|
"a perseverance of delight in the continued and "
|
||||||
|
"indefatigable generation of knowledge, exceeds "
|
||||||
|
"the short vehemence of any carnal pleasure.\n"),
|
||||||
|
270),
|
||||||
|
node["binaryText"].as<Binary>());
|
||||||
|
}
|
||||||
|
|
||||||
TEST(LoadNodeTest, IterateSequence) {
|
TEST(LoadNodeTest, IterateSequence) {
|
||||||
Node node = Load("[1, 3, 5, 7]");
|
Node node = Load("[1, 3, 5, 7]");
|
||||||
int seq[] = {1, 3, 5, 7};
|
int seq[] = {1, 3, 5, 7};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user