added tests for encloseSelection

- added more tests for caret positioning on singleCharacter