diff options
Diffstat (limited to 'test/src/buffer-tests.el')
| -rw-r--r-- | test/src/buffer-tests.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 1c356698f66..6e87cb94897 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el | |||
| @@ -1313,4 +1313,18 @@ with parameters from the *Messages* buffer modification." | |||
| 1313 | (ovshould nonempty-eob-end 4 5) | 1313 | (ovshould nonempty-eob-end 4 5) |
| 1314 | (ovshould empty-eob 5 5))))) | 1314 | (ovshould empty-eob 5 5))))) |
| 1315 | 1315 | ||
| 1316 | (ert-deftest buffer-multibyte-overlong-sequences () | ||
| 1317 | (dolist (uni '("\xE0\x80\x80" | ||
| 1318 | "\xF0\x80\x80\x80" | ||
| 1319 | "\xF8\x8F\xBF\xBF\x80")) | ||
| 1320 | (let ((multi (string-to-multibyte uni))) | ||
| 1321 | (should | ||
| 1322 | (string-equal | ||
| 1323 | multi | ||
| 1324 | (with-temp-buffer | ||
| 1325 | (set-buffer-multibyte nil) | ||
| 1326 | (insert uni) | ||
| 1327 | (set-buffer-multibyte t) | ||
| 1328 | (buffer-string))))))) | ||
| 1329 | |||
| 1316 | ;;; buffer-tests.el ends here | 1330 | ;;; buffer-tests.el ends here |