document_test : bug fix in `testPositionToIndex` ; read the newLineCharacter.length rather than hardcoding `1`

it may be 2 depending on the newLineCharacter string (\r\n)