YAML_ASSERT(doc.to<std::string>()=="Fun with \x5C\x22\x07\x08\x1B\x0C\x0A\x0D\x09\x0B "+std::string("\x00",1)+" \x20\xA0\x85\xe2\x80\xa8\xe2\x80\xa9 A A A");
YAML_ASSERT(doc.to<std::string>()=="Fun with \x5C\x22\x07\x08\x1B\x0C\x0A\x0D\x09\x0B "+std::string("\x00",1)+" \x20\xA0\x85\xe2\x80\xa8\xe2\x80\xa9 A A A");
returntrue;
returntrue;
}
}
...
@@ -846,12 +531,7 @@ namespace Test {
...
@@ -846,12 +531,7 @@ namespace Test {
// 5.14
// 5.14
TESTInvalidEscapedCharacters()
TESTInvalidEscapedCharacters()
{
{
std::stringinput=
std::stringstreamstream(ex5_14);
"Bad escapes:\n"
" \"\\c\n"
" \\xq-\"";
std::stringstreamstream(input);
try{
try{
YAML::Parserparser(stream);
YAML::Parserparser(stream);
YAML::Nodedoc;
YAML::Nodedoc;
...
@@ -867,21 +547,7 @@ namespace Test {
...
@@ -867,21 +547,7 @@ namespace Test {
// 6.1
// 6.1
TESTIndentationSpaces()
TESTIndentationSpaces()
{
{
std::stringinput=
PARSE(doc,ex6_1);
" # Leading comment line spaces are\n"
" # neither content nor indentation.\n"
" \n"
"Not indented:\n"
" By one space: |\n"
" By four\n"
" spaces\n"
" Flow style: [ # Leading spaces\n"
" By two, # in flow style\n"
" Also by two, # are neither\n"
" \tStill by two # content nor\n"
" ] # indentation.";
PARSE(doc,input);
YAML_ASSERT(doc.size()==1);
YAML_ASSERT(doc.size()==1);
YAML_ASSERT(doc["Not indented"].size()==2);
YAML_ASSERT(doc["Not indented"].size()==2);
YAML_ASSERT(doc["Not indented"]["By one space"].to<std::string>()=="By four\n spaces\n");
YAML_ASSERT(doc["Not indented"]["By one space"].to<std::string>()=="By four\n spaces\n");