TrayTempo v0.2.0 : minuteur Pomodoro Windows en Nim avec interface intuitive

This commit is contained in:
2026-08-14 10:39:21 -04:00
commit 3218972ddf
26 changed files with 3154 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
## test_updater.nim
## ==================
## Tests unitaires des fonctions pures du module updater (comparaison de
## versions). Aucun accès réseau.
import std/unittest
import ../src/updater
suite "updater":
test "parseVersion splits dotted numbers":
check parseVersion("0.2.0") == @[0, 2, 0]
check parseVersion("1.10.3") == @[1, 10, 3]
check parseVersion("2") == @[2]
test "parseVersion tolerates non-numeric components":
check parseVersion("v1.2") == @[0, 2]
test "isNewer detects a newer version":
check isNewer("0.2.0", "0.3.0")
check isNewer("0.2.9", "0.2.10")
check isNewer("1.0.0", "1.0.1")
test "isNewer returns false for equal or older versions":
check not isNewer("0.3.0", "0.3.0")
check not isNewer("0.3.0", "0.2.9")
check not isNewer("1.0.0", "0.9.9")
test "fetchLatestVersion returns empty for empty URL":
check fetchLatestVersion("") == ""