17 Nov
2020
17 Nov
'20
1:18 p.m.
Dear all, I have not found a way to make basex unit module to test updating functions. I have a function site:add-movies which results in several db:add instructions. I try to achieve something like: declare %unit:test %updating function test-site:download-movies() { let $result := site:add-movies( $test-site:site-db, test-site:fake-fetch-file#1, 7 ) return unit:assert-equals(1, 1) (: here I am going to check if db contains expected elements :) }; But let command is not valid for updating expression. Basex docs mention something about update:output and update:cache which may be of some use here but no exhaustive example is given for. Anyone had similar problem? BR