Compare commits
4 Commits
a867809cb8
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
060a8dfb3b | ||
|
|
3d7ebcf9bc | ||
|
|
51f10b7944 | ||
|
|
9ed6b48806 |
@@ -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 due = before.must_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());
|
||||
|
||||
Reference in New Issue
Block a user