fix(taskwarrior): parsing and convertion of times and contents
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user