From 6160034fbe19af5fb8022ddf1eac7aca7a587be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 19 Mar 2020 02:17:39 +0100 Subject: Add tests for time->string. --- tests/datetime-util.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/datetime-util.scm b/tests/datetime-util.scm index 6e5ce170..ec5da552 100644 --- a/tests/datetime-util.scm +++ b/tests/datetime-util.scm @@ -1,5 +1,5 @@ (((datetime) date time) - ((datetime util) month-stream in-date-range?) + ((datetime util) month-stream in-date-range? time->string) ((srfi srfi-41) stream->list stream-take )) @@ -23,3 +23,11 @@ (test-assert "in-date-range?" (not ((in-date-range? #2020-01-01 #2020-02-29) #2018-02-02))) + + +(test-equal "time fmt default" + "10:20:30" (time->string #10:20:30)) + +(test-equal "time fmt custom" + "103020" (time->string #10:20:30 "~H~S~M")) + -- cgit v1.2.3