mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
Debug tests
This commit is contained in:
parent
1db614f0a6
commit
f90a3a3478
2 changed files with 5 additions and 8 deletions
11
src/app.rs
11
src/app.rs
|
@ -1410,6 +1410,7 @@ impl TTApp {
|
|||
let reference = TimeZone::from_utc_datetime(now.offset(), d);
|
||||
let now = TimeZone::from_utc_datetime(now.offset(), &now.naive_utc());
|
||||
let d = d.clone();
|
||||
dbg!(reference, now);
|
||||
if (reference - chrono::Duration::nanoseconds(1)).month() == now.month() {
|
||||
add_tag(&mut task, "MONTH".to_string());
|
||||
}
|
||||
|
@ -2003,14 +2004,9 @@ mod tests {
|
|||
|
||||
let mut command = Command::new("task");
|
||||
command.arg("add");
|
||||
let message = format!(
|
||||
"'new task for testing earlier today' due:{:04}-{:02}-{:02}",
|
||||
now.year(),
|
||||
now.month(),
|
||||
now.day()
|
||||
);
|
||||
let message = "'new task for testing earlier today' due:now";
|
||||
|
||||
let shell = message.as_str().replace("'", "\\'");
|
||||
let shell = message.replace("'", "\\'");
|
||||
let cmd = shlex::split(&shell).unwrap();
|
||||
for s in cmd {
|
||||
command.arg(&s);
|
||||
|
@ -2040,6 +2036,7 @@ mod tests {
|
|||
"UNBLOCKED",
|
||||
"YEAR",
|
||||
] {
|
||||
dbg!(s, task.tags());
|
||||
assert!(task.tags().unwrap().contains(&s.to_string()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue