From ef4cc8b84b3041bcc01bf7f050300a9ac72f950d Mon Sep 17 00:00:00 2001 From: "T.v.Dein" Date: Wed, 24 Sep 2025 19:43:50 +0200 Subject: [PATCH] Added more unittests, fixed hour format output (#4) * little refactoring * added more tests, fixed hour format output * bump version --- cmd/config.go | 6 ++-- cmd/root.go | 12 ++++--- cmd/times.go | 46 ++++++++++++++++++-------- cmd/times_test.go | 4 ++- cmd/writer.go | 2 +- cmd/writer_test.go | 81 ++++++++++++++++++++++++++++++++++++++++++++++ go.mod | 4 +++ go.sum | 15 +++++++++ main_test.go | 38 ++++++++++++++++++++++ t/simple.txtar | 10 ++++++ 10 files changed, 196 insertions(+), 22 deletions(-) create mode 100644 cmd/writer_test.go create mode 100644 main_test.go create mode 100644 t/simple.txtar diff --git a/cmd/config.go b/cmd/config.go index 2b10c24..3d0f9e4 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -31,7 +31,7 @@ import ( ) const ( - VERSIONstring = "0.0.2" + VERSIONstring = "0.0.3" Usage string = `This is ts, a timestamp tool. Usage: ts