]> git.eshelyaron.com Git - emacs.git/commitdiff
Add unit test for Bug#26378
authorPhilipp Stephani <phst@google.com>
Sat, 8 Apr 2017 14:55:56 +0000 (16:55 +0200)
committerPhilipp Stephani <phst@google.com>
Sat, 8 Apr 2017 14:55:56 +0000 (16:55 +0200)
* test/lisp/vc/ediff-diff-tests.el
(ediff-diff-tests--ediff-exec-process--nil): New unit test.

test/lisp/vc/ediff-diff-tests.el

index aacc8bfed2b9c76f49ed7f44a819783c527999cc..566f592f84e498e7eb2e5d886f0e7e47587dfdca 100644 (file)
       (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