This test verifies the behavior of undoing autocorrection.

Test 1: Type "the mesage". After seeing the correction panel, type whitespace to accept the correction, then select undo. You should see the second word being reverted to "message".

Test 2: Type "the ". Set font to bold, then type "me". Set font to regular, then type "sage". After seeing the correction panel, type whitespace to accept the correction, then select undo. You should see the second word being reverted to "message" with "me" in bold font.

Note, this test can fail due to user specific spell checking data. If the user has previously frequently revert 'message' to 'mesage'. To fix this, remove all files in ~/Library/Spelling, then kill AppleSpell.service process.