aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/fns-tests.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 79ae4393f40..9c09e4f0c33 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -98,6 +98,26 @@
98 (should-not (equal-including-properties #("a" 0 1 (k "v")) 98 (should-not (equal-including-properties #("a" 0 1 (k "v"))
99 #("b" 0 1 (k "v"))))) 99 #("b" 0 1 (k "v")))))
100 100
101(ert-deftest fns-tests-equal-symbols-with-position ()
102 "Test `eq' and `equal' on symbols with position."
103 (let ((foo1 (position-symbol 'foo 42))
104 (foo2 (position-symbol 'foo 666))
105 (foo3 (position-symbol 'foo 42)))
106 (let (symbols-with-pos-enabled)
107 (should (eq foo1 foo1))
108 (should (equal foo1 foo1))
109 (should-not (eq foo1 foo2))
110 (should-not (equal foo1 foo2))
111 (should-not (eq foo1 foo3))
112 (should (equal foo1 foo3)))
113 (let ((symbols-with-pos-enabled t))
114 (should (eq foo1 foo1))
115 (should (equal foo1 foo1))
116 (should (eq foo1 foo2))
117 (should (equal foo1 foo2))
118 (should (eq foo1 foo3))
119 (should (equal foo1 foo3)))))
120
101(ert-deftest fns-tests-reverse () 121(ert-deftest fns-tests-reverse ()
102 (should-error (reverse)) 122 (should-error (reverse))
103 (should-error (reverse 1)) 123 (should-error (reverse 1))