test(core): the adapter runs refused dates, amounts, periods, roles, exports, 1099 years and returns
The bookspec examples now spell the input an engine has to refuse, and the adapter takes each through the real books: - a date past 9999 is refused by `Store::create_entry`'s own `try_create_entry` (DateOutOfRange), and a line past one quadrillion by `add_line` (AmountOutOfRange), each on a rehearsal so a refused entry leaves no draft; - a close whose period partly overlaps another creates it through `Store::create_period` and reads PeriodsOverlap; - `assign_role` is `Store::assign_role`, the journaled command, so a role on a header is refused by `check_assign_role` (ControlAccountMismatch) and the chart stays as it was; - an IIF export with an entry on a receivable and a payable account is refused with BS-format-10's word, which is why `export_iif` keeps its typed error; - a 2027 worksheet is refused through `RuleNotKnown` as `unknown_1099_year`, never guessed; - `return_tin` reads the full number from the real `ledger_vault::Vault` the example's `setup.vault_tins` fills, and the books' own record keeps only the last four. The adapter skips sixteen examples now (three more, each for an option wanderbooks did not pick): allow-partial-overlap, carry-the-last-amount and nowhere. Every one of the 95 it runs passes. Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
1 parent
9c299eb768
commit
7ac1e644b2
11 files changed
+178
-14
No files matched your search
@@ -165,10 +165,14 @@ pub(crate) fn every_bookspec_example_holds() {
|
||||
// BS-prepaid-2's equal-months and BS-ledger-20's refuse (each option's
|
||||
// example, so no allow-list grows), BS-entry-6's check-only-when-posting
|
||||
// and BS-ledger-17's reversal-needs-its-own (wanderbooks refuses a line on
|
||||
// a header as it is added, and a reversal needs no evidence of its own).
|
||||
// a header as it is added, and a reversal needs no evidence of its own),
|
||||
// and BS-period-4's allow-partial-overlap, BS-1099-2's
|
||||
// carry-the-last-amount and BS-partner-8's nowhere (wanderbooks nests
|
||||
// periods, refuses a year whose threshold it does not know, and keeps
|
||||
// the full TIN outside the books).
|
||||
assert_eq!(
|
||||
skipped.len(),
|
||||
13,
|
||||
"the thirteen unpicked-option examples: {skipped:?}"
|
||||
16,
|
||||
"the sixteen unpicked-option examples: {skipped:?}"
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user