mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
Batch 36: the slideshow template test drops the cached listing after writing a file by hand (flaky when the write lands in the listing's clock tick)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cfd14ea7c1
commit
da7534a2ed
@@ -265,6 +265,9 @@ fn bad_files_are_reported_and_skipped() {
|
||||
// out-of-range numbers in a hand-edited file are clamped, never applied as they are
|
||||
std::fs::write(folder.join("wild.json"), doc(json!({"layout": {"margins": 9, "shadowAngle": 1e300}, "playback": {"slideDuration": 1e9}})))
|
||||
.unwrap();
|
||||
// written by hand, not through LightCraft: the folder's time may not have moved since the
|
||||
// listing above (same clock tick), so the cached listing is dropped as a write would drop it
|
||||
s.slide_templates_cache = None;
|
||||
let t = s.slide_template("user:wild").unwrap();
|
||||
assert_eq!(t.look.layout.margin_left, lightcraft_slideshow::MARGIN_MAX);
|
||||
assert_eq!(t.look.playback.slide_duration, crate::slideshow::SLIDE_MAX);
|
||||
|
||||
Reference in New Issue
Block a user