diff options
Diffstat (limited to 'test/src/coding-tests.el')
| -rw-r--r-- | test/src/coding-tests.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index 110ff126964..93e6709d442 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el | |||
| @@ -383,6 +383,17 @@ | |||
| 383 | (should-not (eq (encode-coding-string s nil nil) s)) | 383 | (should-not (eq (encode-coding-string s nil nil) s)) |
| 384 | (should (eq (encode-coding-string s nil t) s)))) | 384 | (should (eq (encode-coding-string s nil t) s)))) |
| 385 | 385 | ||
| 386 | (ert-deftest coding-nocopy-ascii () | ||
| 387 | "Check that the NOCOPY parameter works for ASCII-only strings." | ||
| 388 | (let* ((uni (apply #'string (number-sequence 0 127))) | ||
| 389 | (multi (string-to-multibyte uni))) | ||
| 390 | (dolist (s (list uni multi)) | ||
| 391 | (dolist (coding '(us-ascii iso-latin-1 utf-8)) | ||
| 392 | (should-not (eq (decode-coding-string s coding nil) s)) | ||
| 393 | (should-not (eq (encode-coding-string s coding nil) s)) | ||
| 394 | (should (eq (decode-coding-string s coding t) s)) | ||
| 395 | (should (eq (encode-coding-string s coding t) s)))))) | ||
| 396 | |||
| 386 | ;; Local Variables: | 397 | ;; Local Variables: |
| 387 | ;; byte-compile-warnings: (not obsolete) | 398 | ;; byte-compile-warnings: (not obsolete) |
| 388 | ;; End: | 399 | ;; End: |