summaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
authorDavid Schlachter <t480-debian-git@schlachter.ca>2025-11-10 00:24:57 -0500
committerDavid Schlachter <t480-debian-git@schlachter.ca>2025-11-10 00:24:57 -0500
commit282df9321e7911285aa18673fdeb562298890b41 (patch)
tree85626d5c23df9f9426084b1d690afc27ad79ba8b /main_test.go
parent3a571437c9af78cefad3d3b225accdfb38561eb3 (diff)
Add simple test
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go
new file mode 100644
index 0000000..3e79bf9
--- /dev/null
+++ b/main_test.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "testing"
+)
+
+func TestMain(t *testing.T) {
+ tasks, err := readInput("testdata/test_tasks.txt")
+ if err != nil {
+ t.Logf("Expected no error when reading input file, got '%s'", err)
+ t.FailNow()
+ }
+
+ if len(tasks) != 3 {
+ t.Logf("Expected 3 tasks to be parsed, got %d", len(tasks))
+ t.FailNow()
+ }
+}