aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-12-27 17:54:57 +0100
committerAndrea Corallo2020-12-27 17:54:57 +0100
commit8fb94630136700aa4e74c7fc212b019d2db380ae (patch)
tree69b3938a89f450509a7001f45ba3acca057fb40d /test/src
parent271fb8a269aff924070b188f23355d0c368356dd (diff)
parentdf882c9701755e2ae063f05d3381de14ae09951e (diff)
downloademacs-8fb94630136700aa4e74c7fc212b019d2db380ae.tar.gz
emacs-8fb94630136700aa4e74c7fc212b019d2db380ae.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'test/src')
-rw-r--r--test/src/fns-tests.el41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index eaa569e0d95..e66dad44a1a 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -999,3 +999,44 @@
999 (object-intervals (current-buffer))) 999 (object-intervals (current-buffer)))
1000 '((0 1 (foo 1)) (1 2 (zot 3 foo 1)) (2 4 (zot 3 bar 2)) 1000 '((0 1 (foo 1)) (1 2 (zot 3 foo 1)) (2 4 (zot 3 bar 2))
1001 (4 5 (bar 2)) (5 6 nil))))) 1001 (4 5 (bar 2)) (5 6 nil)))))
1002
1003(ert-deftest length-equals-tests ()
1004 (should-not (length< (list 1 2 3) 2))
1005 (should-not (length< (list 1 2 3) 3))
1006 (should (length< (list 1 2 3) 4))
1007
1008 (should-not (length< "abc" 2))
1009 (should-not (length< "abc" 3))
1010 (should (length< "abc" 4))
1011
1012 (should (length> (list 1 2 3) 2))
1013 (should-not (length> (list 1 2 3) 3))
1014 (should-not (length> (list 1 2 3) 4))
1015
1016 (should (length> "abc" 2))
1017 (should-not (length> "abc" 3))
1018 (should-not (length> "abc" 4))
1019
1020 (should-not (length= (list 1 2 3) 2))
1021 (should (length= (list 1 2 3) 3))
1022 (should-not (length= (list 1 2 3) 4))
1023
1024 (should-not (length= "abc" 2))
1025 (should (length= "abc" 3))
1026 (should-not (length= "abc" 4))
1027
1028 (should-not (length< (list 1 2 3) -1))
1029 (should-not (length< (list 1 2 3) 0))
1030 (should-not (length< (list 1 2 3) -10))
1031
1032 (should (length> (list 1 2 3) -1))
1033 (should (length> (list 1 2 3) 0))
1034
1035 (should-not (length= (list 1 2 3) -1))
1036 (should-not (length= (list 1 2 3) 0))
1037 (should-not (length= (list 1 2 3) 1))
1038
1039 (should-error
1040 (let ((list (list 1)))
1041 (setcdr list list)
1042 (length< list #x1fffe))))