mirror of https://github.com/Icinga/icinga2.git
parent
338d0aaa8c
commit
3adba5c542
|
@ -193,7 +193,7 @@ String icinga::JsonEncode(const Value& value, bool pretty_print)
|
|||
|
||||
Encode(stateMachine, value);
|
||||
|
||||
return stateMachine.GetResult();
|
||||
return stateMachine.GetResult() + "\n";
|
||||
} else {
|
||||
JsonEncoder<false> stateMachine;
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@ BOOST_AUTO_TEST_CASE(encode)
|
|||
"string": "LF\nTAB\tAUml\u00e4Ill\ufffd",
|
||||
"true": true,
|
||||
"uint": 23.0
|
||||
})EOF");
|
||||
}
|
||||
)EOF");
|
||||
|
||||
BOOST_CHECK(JsonEncode(input, true) == output);
|
||||
|
||||
|
@ -59,7 +60,8 @@ BOOST_AUTO_TEST_CASE(decode)
|
|||
"string": "LF\nTAB\tAUmlIll",
|
||||
"true": true,
|
||||
"uint": 23.0
|
||||
})EOF");
|
||||
}
|
||||
)EOF");
|
||||
|
||||
boost::algorithm::replace_all(input, "AUml", "AUml\xC3\xA4");
|
||||
boost::algorithm::replace_all(input, "Ill", "Ill\xC3");
|
||||
|
|
Loading…
Reference in New Issue