aboutsummaryrefslogtreecommitdiff
path: root/tests/tconditionchecker.nim
diff options
context:
space:
mode:
authorhistoria <gravel.justness270@slmail.me>2024-08-11 06:09:42 -0400
committerhistoria <gravel.justness270@slmail.me>2024-08-11 06:09:42 -0400
commite5c80a22c35a5745ae957b8e84da42abd0c41d4d (patch)
treeb8f6f03e45c91fb197be5ca64ce14cc69a4cb184 /tests/tconditionchecker.nim
parent63e113de4afe54c47789d4ce20b26a1665880c2a (diff)
downloadsoon-e5c80a22c35a5745ae957b8e84da42abd0c41d4d.tar.gz
Feature: One-sided conditions like -(Aug 15 2025)
Diffstat (limited to 'tests/tconditionchecker.nim')
-rw-r--r--tests/tconditionchecker.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tconditionchecker.nim b/tests/tconditionchecker.nim
new file mode 100644
index 0000000..f7909b2
--- /dev/null
+++ b/tests/tconditionchecker.nim
@@ -0,0 +1,16 @@
+import soon/conditionchecker
+import std/[unittest]
+import std/[times]
+
+let date1 = dateTime(2025, mJan, 01, 00, 00, 00, 00, utc())
+let date2 = dateTime(2025, mJan, 01, 00, 00, 00, 00, local())
+let date3 = dateTime(2025, mDec, 31, 00, 00, 00, 00, utc())
+let date4 = dateTime(2024, mFeb, 29, 00, 00, 00, 00, local())
+let date5 = dateTime(0001, mJan, 01, 00, 00, 00, 00, local())
+let date6 = dateTime(9999, mDec, 31, 00, 00, 00, 00, local())
+
+
+test "Time (always true)":
+ check checkCond("00:00", date1) == true
+ check checkCond("23:59", date2) == true
+ check checkCond("25:00", date3) == true