aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-09-08 16:31:53 +0200
committerAndrea Corallo2020-01-01 11:37:45 +0100
commitfca675dae325a974c625893fb0ad1aa88abeab8f (patch)
treed6ae185a2754b82a03f9da57b78ebb2aed40a93f /test/src
parent59a428ed6ccd7ee41e847b1d63889845fae7ebd5 (diff)
downloademacs-fca675dae325a974c625893fb0ad1aa88abeab8f.tar.gz
emacs-fca675dae325a974c625893fb0ad1aa88abeab8f.zip
fix varset and add a test
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-test-funcs.el5
-rw-r--r--test/src/comp-tests.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el
index b92716739b9..4fc62482a0d 100644
--- a/test/src/comp-test-funcs.el
+++ b/test/src/comp-test-funcs.el
@@ -50,8 +50,11 @@
50(defun comp-tests-cons-cdr-f (x) 50(defun comp-tests-cons-cdr-f (x)
51 (cdr (cons 'foo x))) 51 (cdr (cons 'foo x)))
52 52
53(defun comp-tests-varset-f () 53(defun comp-tests-varset0-f ()
54 (setq comp-tests-var1 55)) 54 (setq comp-tests-var1 55))
55(defun comp-tests-varset1-f ()
56 (setq comp-tests-var1 66)
57 4)
55 58
56(defun comp-tests-length-f () 59(defun comp-tests-length-f ()
57 (length '(1 2 3))) 60 (length '(1 2 3)))
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 47ae7899c69..331e1cfed16 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -71,8 +71,11 @@
71 71
72(ert-deftest comp-tests-varset () 72(ert-deftest comp-tests-varset ()
73 "Testing varset." 73 "Testing varset."
74 (comp-tests-varset-f) 74 (comp-tests-varset0-f)
75 (should (= comp-tests-var1 55))) 75 (should (= comp-tests-var1 55))
76
77 (should (= (comp-tests-varset1-f) 4))
78 (should (= comp-tests-var1 66)))
76 79
77(ert-deftest comp-tests-length () 80(ert-deftest comp-tests-length ()
78 "Testing length." 81 "Testing length."