summaryrefslogtreecommitdiff
path: root/test/lisp/subr-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/subr-tests.el')
-rw-r--r--test/lisp/subr-tests.el31
1 files changed, 30 insertions, 1 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index f5c1c40263e..be613ce7595 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -368,6 +368,17 @@
2)))
(ert-deftest string-comparison-test ()
+ (should (string-equal-ignore-case "abc" "abc"))
+ (should (string-equal-ignore-case "abc" "ABC"))
+ (should (string-equal-ignore-case "abc" "abC"))
+ (should-not (string-equal-ignore-case "abc" "abCD"))
+ (should (string-equal-ignore-case "S" "s"))
+ (should (string-equal-ignore-case "ẞ" "ß"))
+ (should (string-equal-ignore-case "Dz" "DZ"))
+ (should (string-equal-ignore-case "Όσος" "ΌΣΟΣ"))
+ ;; not yet: (should (string-equal-ignore-case "SS" "ß"))
+ ;; not yet: (should (string-equal-ignore-case "SS" "ẞ"))
+
(should (string-lessp "abc" "acb"))
(should (string-lessp "aBc" "abc"))
(should (string-lessp "abc" "abcd"))
@@ -1026,7 +1037,15 @@ final or penultimate step during initialization."))
(ert-deftest test-readablep ()
(should (readablep "foo"))
- (should-not (readablep (list (make-marker)))))
+ (should-not (readablep (list (make-marker))))
+ (should-not (readablep (make-marker))))
+
+(ert-deftest test-print-unreadable-function ()
+ ;; Check that problem with unwinding properly is fixed (bug#56773).
+ (with-temp-buffer
+ (let ((buf (current-buffer)))
+ (readablep (make-marker))
+ (should (eq buf (current-buffer))))))
(ert-deftest test-string-lines ()
(should (equal (string-lines "") '("")))
@@ -1107,5 +1126,15 @@ final or penultimate step during initialization."))
(should (equal (butlast l n)
(subr-tests--butlast-ref l n))))))
+(ert-deftest test-print-unreadable-function-buffer ()
+ (with-temp-buffer
+ (let ((current (current-buffer))
+ callback-buffer)
+ (let ((print-unreadable-function
+ (lambda (_object _escape)
+ (setq callback-buffer (current-buffer)))))
+ (prin1-to-string (make-marker)))
+ (should (eq current callback-buffer)))))
+
(provide 'subr-tests)
;;; subr-tests.el ends here