[add] diags from server

This commit is contained in:
Andy Bunce 2025-08-14 18:20:41 +01:00
parent 5c759eb3f4
commit 2078055d05
8 changed files with 150 additions and 15 deletions

View file

@ -26,9 +26,8 @@ declare %unit:test function test:resolvePosition() {
(:~ convert all position. :)
declare %unit:test function test:toPosition() {
let $text:=unparsed-text("sample.docs/pdfbox.xqm")
let $nl:= index-of(string-to-codepoints($text),10)
return for $i in 0 to string-length($text)-1
let $pos:=pos:toPosition($text,$i,$nl)
let $pos:=pos:toPosition($text,$i)
return unit:assert-equals($i,pos:resolvePosition($text,$pos))
};