Test appending text as well as replacing the entire text. Insert non-ASCII text to verify offsets are correct.