store: ensure updates update message sexp too

And turn all "add" into "replace" so old messages get removed.
Update tests too.
This commit is contained in:
Dirk-Jan C. Binnema
2022-05-05 01:27:08 +03:00
parent c0ae7e6860
commit 6126d7ee62
8 changed files with 329 additions and 170 deletions

View File

@ -190,7 +190,12 @@ Sexp::to_sexp_string() const
sstrm << ')';
break;
}
case Type::String: sstrm << quote(value()); break;
case Type::String:
sstrm << quote(value());
break;
case Type::Raw:
sstrm << value();
break;
case Type::Number:
case Type::Symbol:
case Type::Empty:
@ -231,7 +236,12 @@ Sexp::to_json_string() const
}
break;
}
case Type::String: sstrm << quote(value()); break;
case Type::String:
sstrm << quote(value());
break;
case Type::Raw: // FIXME: implement this.
break;
case Type::Symbol:
if (is_nil())
sstrm << "false";