5 Commits

Author SHA1 Message Date
Bel LaPointe
060a8dfb3b new tests 2025-12-02 17:47:12 -07:00
Bel LaPointe
3d7ebcf9bc drop one debug 2025-12-02 17:42:36 -07:00
Bel LaPointe
51f10b7944 shush warn 2025-12-02 17:40:25 -07:00
Bel LaPointe
9ed6b48806 shhhh warning 2025-12-02 17:36:29 -07:00
Bel LaPointe
a867809cb8 use to shush warn 2025-12-02 17:35:57 -07:00

View File

@@ -34,8 +34,7 @@ fn main() {
for file in files.files.iter() {
println!(
"{} => {}",
file.file,
"{}",
serde_yaml::to_string(&file.events().unwrap().snapshot().unwrap()).unwrap(),
);
}
@@ -203,10 +202,9 @@ impl File {
if !after.contains(before) {
self.append(Delta::remove_at(before.clone(), now))?;
let now = Delta::now_time();
if let Some(due) = before.next_due(now.clone()) {
if due >= now {
self.append(Delta::add_at(before.clone(), due))?;
}
let due = before.must_next_due(now.clone());
if due >= now {
self.append(Delta::add_at(before.clone(), due))?;
}
}
}
@@ -474,6 +472,21 @@ mod test_file {
});
}
#[test]
fn test_schedule_cron_resolve_reschedules() {
panic!("not impl");
}
#[test]
fn test_schedule_duration_resolve_reschedules() {
panic!("not impl");
}
#[test]
fn test_schedule_date_resolve_does_not_reschedule() {
panic!("not impl");
}
#[test]
fn test_schedule_date_future_with_snapshot_between_scheduled_and_fired() {
tests::with_dir(|d| {
@@ -990,6 +1003,7 @@ mod tests {
f.sync_all().unwrap();
}
#[allow(dead_code)]
pub fn file_contains(d: &tempdir::TempDir, fname: &str, content: &str) {
let p = d.path().join(&fname);
let file_content = file_content(&p.to_str().unwrap().to_string());