@@ -424,6 +424,68 @@ content''');
424424 expect (doc.attachDir, (type: OrgAttachDirType .dir, dir: '/bar/' ));
425425 });
426426 });
427+ group ('properties' , () {
428+ test ('simple' , () {
429+ final result = parser.parse ('''
430+ :PROPERTIES:
431+ :FOO: foo
432+ :END:
433+ ''' );
434+ final doc = result.value as OrgDocument ;
435+ expect (doc.getProperties (':FOO:' ), ['foo' ]);
436+ expect (doc.getProperties ('FOO' ), isEmpty);
437+ expect (doc.getProperties (':BAR:' ), isEmpty);
438+ });
439+ test ('multiple' , () {
440+ final result = parser.parse ('''
441+ :PROPERTIES:
442+ :FOO: foo
443+ :BAR: bar
444+ :END:
445+ ''' );
446+ final doc = result.value as OrgDocument ;
447+ expect (doc.getProperties (':FOO:' ), ['foo' ]);
448+ expect (doc.getProperties (':BAR:' ), ['bar' ]);
449+ });
450+ test ('duplicate' , () {
451+ final result = parser.parse ('''
452+ :PROPERTIES:
453+ :FOO: foo
454+ :FOO: bar
455+ :END:
456+ ''' );
457+ final doc = result.value as OrgDocument ;
458+ expect (doc.getProperties (':FOO:' ), ['foo' , 'bar' ]);
459+ });
460+ test ('inheritance' , () {
461+ final result = parser.parse ('''
462+ :PROPERTIES:
463+ :FOO: foo
464+ :FOO: bar
465+ :END:
466+
467+ * Section
468+ :PROPERTIES:
469+ :FOO: baz
470+ :BAZINGA: qux
471+ :END:
472+ ''' );
473+ final doc = result.value as OrgDocument ;
474+ expect (doc.getProperties (':FOO:' ), ['foo' , 'bar' ]);
475+ expect (doc.getProperties (':BAZINGA:' ), isEmpty);
476+ final section = doc.sections[0 ];
477+ expect (section.getProperties (':FOO:' ), ['baz' ]);
478+ expect (section.getProperties (':BAZINGA:' ), ['qux' ]);
479+ expect (
480+ section.getPropertiesWithInheritance (':FOO:' , doc),
481+ ['foo' , 'bar' , 'baz' ],
482+ );
483+ expect (
484+ section.getPropertiesWithInheritance (':BAZINGA:' , doc),
485+ ['qux' ],
486+ );
487+ });
488+ });
427489 group ('decrypted content' , () {
428490 test ('verbatim' , () {
429491 final cleartext = '''foo
0 commit comments