//! **The tests' interface loader — one copy, both stores** (decision 1751). //! //! Half a dozen test files carried an identical private `load_xml` that read //! `assets/ui/` off disk, parsed it, and asserted the loader reported no errors — each with //! the comment "duplicated so this file is self-contained". That was fine while `assets/ui` was //! the only place an interface file could come from. It is not any more: a migrated window's file //! lives in the player's own patch chain, so a test that wants bag windows has to name //! `Interface\FrameXML\ContainerFrame.xml`, and six copies of a disk-only reader cannot say that. //! //! [`load_ui`] is that reader, generalised the same way [`super::manifest::load_manifest`] is: //! **a bare filename is a file we ship, a path is one off the player's install.** The two are told //! apart by [`super::reference_ui::is_chain_entry`], the manifest's own rule, so a test loads the //! entries in the order `benilla.toc` names them and gets what the client gets. //! //! It reads the SOURCE TREE rather than the compiled-in copy, deliberately: these tests exist to //! catch a mistake in a file somebody just edited, and `content::read`'s dev-build probe already //! prefers disk for the same reason. use benilla_ui::script::{QuadContent, UiScript}; /// Load one interface file into `s`, panicking on any loader error, and return how many frames it /// materialized (`0` for a `.lua` entry, which materializes none). /// /// `entry` is a manifest entry: `"BagFrame.xml"` for one of ours, or /// `"Interface\\FrameXML\\ContainerFrame.xml"` for the reference's own — which also brings its /// `