mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 23:08:40 +02:00
Fix up unit tests.
This commit is contained in:
@@ -1819,6 +1819,20 @@ set x ampm(23:12) + ""
|
|||||||
ampm(23:12) => "11:12PM"
|
ampm(23:12) => "11:12PM"
|
||||||
"11:12PM" + "" => "11:12PM"
|
"11:12PM" + "" => "11:12PM"
|
||||||
|
|
||||||
|
# Coerce with am/pm
|
||||||
|
set x coerce("TIME", "12:45am")
|
||||||
|
coerce("TIME", "12:45am") => 00:45
|
||||||
|
set x coerce("TIME", "12:45")
|
||||||
|
coerce("TIME", "12:45") => 12:45
|
||||||
|
set x coerce("TIME", "1:45pm")
|
||||||
|
coerce("TIME", "1:45pm") => 13:45
|
||||||
|
set x coerce("DATETIME", "2020-05-05@12:45am")
|
||||||
|
coerce("DATETIME", "2020-05-05@12:45am") => 2020-05-05@00:45
|
||||||
|
set x coerce("DATETIME", "2020-05-05@12:45")
|
||||||
|
coerce("DATETIME", "2020-05-05@12:45") => 2020-05-05@12:45
|
||||||
|
set x coerce("DATETIME", "2020-05-05@1:45pm")
|
||||||
|
coerce("DATETIME", "2020-05-05@1:45pm") => 2020-05-05@13:45
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test 2
|
Test 2
|
||||||
|
|||||||
@@ -517,6 +517,14 @@ set x ampm(21:12) + ""
|
|||||||
set x ampm(22:12) + ""
|
set x ampm(22:12) + ""
|
||||||
set x ampm(23:12) + ""
|
set x ampm(23:12) + ""
|
||||||
|
|
||||||
|
# Coerce with am/pm
|
||||||
|
set x coerce("TIME", "12:45am")
|
||||||
|
set x coerce("TIME", "12:45")
|
||||||
|
set x coerce("TIME", "1:45pm")
|
||||||
|
set x coerce("DATETIME", "2020-05-05@12:45am")
|
||||||
|
set x coerce("DATETIME", "2020-05-05@12:45")
|
||||||
|
set x coerce("DATETIME", "2020-05-05@1:45pm")
|
||||||
|
|
||||||
__EOF__
|
__EOF__
|
||||||
REM This line should not even be seen
|
REM This line should not even be seen
|
||||||
And you can put whatever you like here.
|
And you can put whatever you like here.
|
||||||
|
|||||||
Reference in New Issue
Block a user