xo-indentlog: xo::print::quoted -> quot, avoiding std::quoted

This commit is contained in:
Roland Conybeare 2024-05-01 22:31:27 -04:00
commit ea7d79f95c
4 changed files with 203 additions and 65 deletions

View file

@ -9,19 +9,21 @@
using namespace xo;
namespace ut {
using xo::print::ccs;
TEST_CASE("tag", "[tag]") {
tag_config::tag_color = color_spec_type::none();
{
std::stringstream ss;
ss << tag("foo", "hello,world!");
ss << tag("foo", ccs("hello,world!"));
REQUIRE(ss.str() == ":foo hello,world!");
}
{
std::stringstream ss;
ss << tag("foo", "hello, world!");
ss << tag("foo", ccs("hello, world!"));
REQUIRE(ss.str() == ":foo \"hello, world!\"");
}
@ -43,7 +45,7 @@ namespace ut {
{
std::stringstream ss;
ss << tag("foo", "hello") << xtag("bar", "there");
ss << tag("foo", ccs("hello")) << xtag("bar", ccs("there"));
REQUIRE(ss.str() == ":foo hello :bar there");
}
@ -52,7 +54,7 @@ namespace ut {
{
std::stringstream ss;
ss << tag("foo", "hello,world!");
ss << tag("foo", ccs("hello,world!"));
/* color on color off
* <---------> <----->