diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/data-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el index bc77a7be94e..a9d48e29a8a 100644 --- a/test/src/data-tests.el +++ b/test/src/data-tests.el | |||
| @@ -669,4 +669,22 @@ comparing the subr with a much slower lisp implementation." | |||
| 669 | (should (= (lsh -1 -1) most-positive-fixnum)) | 669 | (should (= (lsh -1 -1) most-positive-fixnum)) |
| 670 | (should-error (lsh (1- most-negative-fixnum) -1))) | 670 | (should-error (lsh (1- most-negative-fixnum) -1))) |
| 671 | 671 | ||
| 672 | (ert-deftest data-tests-make-local-forwarded-var () ;bug#34318 | ||
| 673 | ;; Boy, this bug is tricky to trigger. You need to: | ||
| 674 | ;; - call make-local-variable on a forwarded var (i.e. one that | ||
| 675 | ;; has a corresponding C var linked via DEFVAR_(LISP|INT|BOOL)) | ||
| 676 | ;; - cause the C code to modify this variable from the C side of the | ||
| 677 | ;; forwarding, but this needs to happen before the var is accessed | ||
| 678 | ;; from the Lisp side and before we switch to another buffer. | ||
| 679 | ;; The trigger in bug#34318 doesn't exist any more because the C code has | ||
| 680 | ;; changes. Instead I found the trigger below. | ||
| 681 | (with-temp-buffer | ||
| 682 | (setq last-coding-system-used 'bug34318) | ||
| 683 | (make-local-variable 'last-coding-system-used) | ||
| 684 | ;; This should set last-coding-system-used to `no-conversion'. | ||
| 685 | (decode-coding-string "hello" nil) | ||
| 686 | (should (equal (list last-coding-system-used | ||
| 687 | (default-value 'last-coding-system-used)) | ||
| 688 | '(no-conversion bug34318))))) | ||
| 689 | |||
| 672 | ;;; data-tests.el ends here | 690 | ;;; data-tests.el ends here |