From 5ea696fd24c2bd8006050866fba0ccab1c0ff931 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sat, 8 Apr 2017 16:55:56 +0200 Subject: [PATCH] Add unit test for Bug#26378 * test/lisp/vc/ediff-diff-tests.el (ediff-diff-tests--ediff-exec-process--nil): New unit test. --- test/lisp/vc/ediff-diff-tests.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/lisp/vc/ediff-diff-tests.el b/test/lisp/vc/ediff-diff-tests.el index aacc8bfed2b..566f592f84e 100644 --- a/test/lisp/vc/ediff-diff-tests.el +++ b/test/lisp/vc/ediff-diff-tests.el @@ -41,4 +41,15 @@ (should (equal call-process-args `(("diff" nil ,(current-buffer) nil "/a" "/b"))))))) +(ert-deftest ediff-diff-tests--ediff-exec-process--nil () + "Check that Bug#26378 is fixed." + (cl-letf* ((call-process-args ()) + ((symbol-function #'call-process) + (lambda (&rest args) (push args call-process-args) 0))) + (with-temp-buffer + (ediff-exec-process "diff" (current-buffer) :synchronous "" + "foo" nil "") + (should (equal call-process-args + `(("diff" nil ,(current-buffer) nil "foo"))))))) + ;;; ediff-diff-tests.el ends here -- 2.39.2