@@ -283,6 +283,109 @@ let block =
283
283
; size = None
284
284
}) )
285
285
] )
286
+ ; ( " Headline with timestamps"
287
+ , testcases
288
+ [ ( " Schedule"
289
+ , `Quick
290
+ , check_aux " * aaa\n SCHEDULED: <1999-03-31 Wed>"
291
+ (Type. Heading
292
+ { title = [ (I. Plain " aaa" , None ) ]
293
+ ; tags = [ ]
294
+ ; marker = None
295
+ ; level = 1
296
+ ; numbering = None
297
+ ; priority = None
298
+ ; anchor = " aaa"
299
+ ; meta = { Type. timestamps = [ I. Scheduled
300
+ { date =
301
+ { day = 31
302
+ ; month = 3
303
+ ; year = 1999
304
+ }
305
+ ; time = None
306
+ ; repetition = None
307
+ ; wday = " Wed"
308
+ ; active = true
309
+ } ]
310
+ ; properties = [] }
311
+ ; unordered = true
312
+ ; size = None
313
+ }) )
314
+ ; ( " Schedule repeater"
315
+ , `Quick
316
+ , check_aux " * aaa\n SCHEDULED: <1999-03-31 Wed .+1y>"
317
+ (Type. Heading
318
+ { title = [ (I. Plain " aaa" , None ) ]
319
+ ; tags = [ ]
320
+ ; marker = None
321
+ ; level = 1
322
+ ; numbering = None
323
+ ; priority = None
324
+ ; anchor = " aaa"
325
+ ; meta = { Type. timestamps = [ I. Scheduled
326
+ { date =
327
+ { day = 31
328
+ ; month = 3
329
+ ; year = 1999
330
+ }
331
+ ; time = None
332
+ ; repetition = Some (Dotted , Year , 1 )
333
+ ; wday = " Wed"
334
+ ; active = true
335
+ } ]
336
+ ; properties = [] }
337
+ ; unordered = true
338
+ ; size = None
339
+ }) )
340
+ ; ( " Schedule repeater and deadline"
341
+ , `Quick
342
+ , check_aux " * aaa [[link][label]] :bb:cc:\n SCHEDULED: <1999-03-31 Wed 12:00-12:30 ++2w>\n DEADLINE: <1999-04-01 Thu>"
343
+ (Type. Heading
344
+ { title =
345
+ [ (I. Plain " aaa " , None )
346
+ ; ( I. Link
347
+ { I. url = I. Search " link"
348
+ ; label = [ I. Plain " label" ]
349
+ ; title = None
350
+ ; full_text = " [[link][label]]"
351
+ ; metadata = " "
352
+ }
353
+ , None )
354
+ ]
355
+ ; tags = [ " bb" ; " cc" ]
356
+ ; marker = None
357
+ ; level = 1
358
+ ; numbering = None
359
+ ; priority = None
360
+ ; anchor = " aaa_label"
361
+ ; meta = { Type. timestamps = [ I. Scheduled
362
+ { date =
363
+ { day = 31
364
+ ; month = 3
365
+ ; year = 1999
366
+ }
367
+ (* Having a time range like 12:00-12:30 doesn’t seem supported *)
368
+ ; time = Some { hour = 12 ; min = 0 }
369
+ ; repetition = Some (DoublePlus , Week , 2 )
370
+ ; wday = " Wed"
371
+ ; active = true
372
+ }
373
+ ; I. Deadline
374
+ { date =
375
+ { day = 1
376
+ ; month = 4
377
+ ; year = 1999
378
+ }
379
+ ; time = None
380
+ ; repetition = None
381
+ ; wday = " Thu"
382
+ ; active = true
383
+ } ]
384
+ ; properties = [] }
385
+ ; unordered = true
386
+ ; size = None
387
+ }) )
388
+ ] )
286
389
]
287
390
288
391
let () = Alcotest. run " mldoc" @@ List. concat [ block; inline ]
0 commit comments