diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-05-11 21:22:18 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-05-11 21:22:18 +0200 |
commit | 2a75d9547adf2cdb883b895b45ac63c71d8b4608 (patch) | |
tree | e4bcff6f57404b1f18a355a8c03e7b11547d4546 | |
parent | Add remove-child! at appropriate places. (diff) | |
download | calp-2a75d9547adf2cdb883b895b45ac63c71d8b4608.tar.gz calp-2a75d9547adf2cdb883b895b45ac63c71d8b4608.tar.xz |
Add test for remove-child!
-rw-r--r-- | tests/test/vcomponent.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test/vcomponent.scm b/tests/test/vcomponent.scm index d3ee37dc..68715462 100644 --- a/tests/test/vcomponent.scm +++ b/tests/test/vcomponent.scm @@ -5,7 +5,9 @@ (define-module (test vcomponent) :use-module (srfi srfi-64) :use-module (srfi srfi-88) - :use-module ((vcomponent base) :select (prop)) + :use-module ((vcomponent base) + :select (prop make-vcomponent add-child! remove-child! + children)) :use-module ((vcomponent formats ical parse) :select (parse-calendar))) @@ -20,4 +22,9 @@ (test-equal "value" (prop ev 'X-KEY)) +(define calendar (make-vcomponent 'VCALENDAR)) +(add-child! calendar ev) +(test-equal 1 (length (children calendar))) +(remove-child! calendar ev) +(test-equal 0 (length (children calendar))) |