@@ -63,6 +63,8 @@ def test_check_unhandled_rules(grammar):
6363 "hours" ,
6464 "seconds" ,
6565 "milliseconds" ,
66+ "microseconds" ,
67+ "nanoseconds" ,
6668 "minutes" ,
6769
6870 # handled as aliases
@@ -117,6 +119,20 @@ def test_check_unhandled_rules(grammar):
117119 param ("duration" , "T#1D1H1M1S1MS" , tf .Duration (days = "1" , hours = "1" , minutes = "1" , seconds = "1" , milliseconds = "1" )), # noqa: E501
118120 param ("duration" , "TIME#1H1M1S1MS" , tf .Duration (hours = "1" , minutes = "1" , seconds = "1" , milliseconds = "1" )), # noqa: E501
119121 param ("time_of_day" , "TIME_OF_DAY#1:1:1.2" , tf .TimeOfDay (hour = "1" , minute = "1" , second = "1.2" )), # noqa: E501
122+ param ("lduration" , "LTIME#-1D" , tf .Lduration (days = "1" , negative = True )),
123+ param ("lduration" , "LTIME#1D" , tf .Lduration (days = "1" )),
124+ param ("lduration" , "LTIME#10S" , tf .Lduration (seconds = "10" )),
125+ param ("lduration" , "LTIME#1H" , tf .Lduration (hours = "1" )),
126+ param ("lduration" , "LTIME#1M" , tf .Lduration (minutes = "1" )),
127+ param ("lduration" , "LTIME#10MS" , tf .Lduration (milliseconds = "10" )),
128+ param ("lduration" , "LTIME#1.1D" , tf .Lduration (days = "1.1" )),
129+ param ("lduration" , "LTIME#10.1S" , tf .Lduration (seconds = "10.1" )),
130+ param ("lduration" , "LTIME#1.1H" , tf .Lduration (hours = "1.1" )),
131+ param ("lduration" , "LTIME#1.1M" , tf .Lduration (minutes = "1.1" )),
132+ param ("lduration" , "LTIME#10.1MS" , tf .Lduration (milliseconds = "10.1" )),
133+ param ("lduration" , "LT#1D1H1M1S1MS" , tf .Lduration (days = "1" , hours = "1" , minutes = "1" , seconds = "1" , milliseconds = "1" )), # noqa: E501
134+ param ("lduration" , "LTIME#1H1M1S1MS" , tf .Lduration (hours = "1" , minutes = "1" , seconds = "1" , milliseconds = "1" )), # noqa: E501
135+ param ("ltime_of_day" , "LTIME_OF_DAY#1:1:1.2" , tf .LtimeOfDay (hour = "1" , minute = "1" , second = "1.2" )), # noqa: E501
120136 ],
121137)
122138def test_literal (name , value , expected ):
@@ -159,6 +175,8 @@ def test_literal(name, value, expected):
159175 param ("time_of_day" , "TIME_OF_DAY#1:1:1.2" ),
160176 param ("date" , "DATE#1970-1-1" ),
161177 param ("date_and_time" , "DT#1970-1-1-1:2:30.3" ),
178+ param ("ldate" , "LDATE#1970-1-1" ),
179+ param ("ldate_and_time" , "LDT#1970-1-1-1:2:30.300123456" ),
162180 param ("single_byte_string_spec" , "STRING[1]" ),
163181 param ("single_byte_string_spec" , "STRING(1)" ),
164182 param ("single_byte_string_spec" , "STRING(1) := 'abc'" ),
0 commit comments