fix(taskwarrior): parsing and convertion of times and contents

This commit is contained in:
2023-10-22 12:32:53 +02:00
parent ce2a4769c9
commit 5764a32f02
5 changed files with 103 additions and 26 deletions

View File

@@ -1 +1,18 @@
package taskwarrior
import (
"testing"
"time"
)
func TestTimeCoversions(t *testing.T) {
current_time := time.Now()
task_current_time := GoTimeToTaskTime(current_time)
go_current_time := TaskTimeToGoTime(task_current_time)
task_current_time = GoTimeToTaskTime(go_current_time)
current_time = TaskTimeToGoTime(task_current_time)
if current_time.Compare(go_current_time) != 0 {
t.Fatalf("conversion failed: Expected: `%s` but got: `%s`", current_time.String(), go_current_time.String())
}
}