Show line-ups before kickoff, bind form and table widgets, rewrite the press wording
- Live ticker: the paused live state carries both starting elevens; the ticker lists them until the first report. A single match no longer gets an empty strip above the score, repeated status lines are gone, whistles carry no club badge, dates are written out. - Desk: "Die letzten Spiele" and the table place curve are fed by the engine (desktop-widgets read: recent, rankCurve) and belong to the default layout; the own crest widget is bound. - News: the German press templates are rewritten to one plain sentence each (the catalogue accepts a single sentence now); the reference snapshots follow, and the catalogue test can rewrite them with --update. Mailbox texts show world spellings of clubs and players and the euro sign. - Small type raised in advertising, lineup, news, toto, transfer and others; the transfer market column no longer runs under its scrollbar. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd20960f90
commit
9708b720b2
33 files changed
+418
-373
No files matched your search
@@ -19,9 +19,19 @@ void no(const Json &value, const std::string &code) {
|
||||
} // namespace
|
||||
int main(int argc, char **argv) {
|
||||
try {
|
||||
require(argc == 3, "Catalogue and synthetic reference paths required");
|
||||
// a fourth argument "--update" rewrites the expected snapshots after a deliberate
|
||||
// change of the catalogue's wording
|
||||
const bool update = argc == 4 && std::string(argv[3]) == "--update";
|
||||
require(argc == 3 || update, "Catalogue and synthetic reference paths required");
|
||||
const auto catalog = NewsCatalog::load(argv[1]);
|
||||
const auto reference = Json::parse(bmh::editor::read_file(argv[2]));
|
||||
auto reference = Json::parse(bmh::editor::read_file(argv[2]));
|
||||
if (update) {
|
||||
for (auto &test : reference.at("cases"))
|
||||
test["result"] = catalog.from_event(test.at("event"), test.at("context"));
|
||||
bmh::editor::write_atomic(argv[2], reference.dump());
|
||||
std::cout << "reference updated\n";
|
||||
return 0;
|
||||
}
|
||||
require(catalog.registry().size() == 113,
|
||||
"113 own authored templates registered");
|
||||
size_t passed = 0, mismatches = 0;
|
||||
|
||||
Reference in new issue
Block a user