(require 'ert-x)
(eval-when-compile (require 'cl-lib))
+(ert-deftest subr-test-apply-partially ()
+ (should (functionp (apply-partially #'identity)))
+ (should (functionp (apply-partially #'list 1 2 3)))
+ (should (equal (mapcar (apply-partially #'identity) '(9 cups of sugar))
+ '(9 cups of sugar)))
+ (should (equal (mapcar (apply-partially #'eq 3) '(3 spoons of butter))
+ '(t nil nil nil)))
+ (should (equal (funcall (apply-partially #'list 1 2 3) 4)
+ '(1 2 3 4)))
+ (let* ((a 1) (b 2) (c 3)
+ (fun (apply-partially #'list a b c)))
+ (should (equal (funcall fun 4) '(1 2 3 4)))))
+
(ert-deftest subr-test-zerop ()
(should (zerop 0))
(should (zerop 0.0))