aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2019-02-15 18:34:38 -0500
committerStefan Monnier2019-02-15 18:34:38 -0500
commitfd0ab0b9bd5991c1a2c598a7c78ec3f491a783bd (patch)
tree322ae17681cb608a95e867dbf905b832713cb774 /test
parent3c80bc333750b62ed98d3064cf98b74b43121a5e (diff)
parenta298a1f6b2fc745163198825941dbe593dff331c (diff)
downloademacs-fd0ab0b9bd5991c1a2c598a7c78ec3f491a783bd.tar.gz
emacs-fd0ab0b9bd5991c1a2c598a7c78ec3f491a783bd.zip
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
Diffstat (limited to 'test')
-rw-r--r--test/lisp/textmodes/conf-mode-tests.el2
-rw-r--r--test/src/data-tests.el18
2 files changed, 19 insertions, 1 deletions
diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/conf-mode-tests.el
index 5d79ceec967..3eefc8f84f9 100644
--- a/test/lisp/textmodes/conf-mode-tests.el
+++ b/test/lisp/textmodes/conf-mode-tests.el
@@ -33,7 +33,7 @@
33 (conf-colon-mode) 33 (conf-colon-mode)
34 (conf-align-assignments) 34 (conf-align-assignments)
35 (should (equal (buffer-string) 35 (should (equal (buffer-string)
36 "foo: bar\nbar: baz")))) 36 "foo: bar\nbar: baz"))))
37 37
38(ert-deftest conf-test-font-lock () 38(ert-deftest conf-test-font-lock ()
39 (with-temp-buffer 39 (with-temp-buffer
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