]> git.eshelyaron.com Git - emacs.git/commitdiff
Use only posix options in a ediff-ptch test
authorTino Calancha <tino.calancha@gmail.com>
Sat, 1 Apr 2017 08:02:49 +0000 (17:02 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Sat, 1 Apr 2017 08:02:49 +0000 (17:02 +0900)
* test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084):
Use just "-b" patch option.  Don't assume a particular suffix for
the backup files.

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

index 7372a72021a295b32a6d16903b2342619355b0f7..387786ced06e7d521c12f32f8675b57e2aadc9f1 100644 (file)
@@ -86,18 +86,23 @@ index 6a07f80..6e8e947 100644
                                    (point-max)
                                    ediff-patch-program
                                    nil nil nil
-                                   "-f" "-z.orig" "-b"
-                                   (cdr x))))
+                                   "-b" (cdr x))))
           ;; Check backup files were saved correctly.
           (dolist (x (list qux bar))
-            (should-not (string= (with-temp-buffer
-                                   (insert-file-contents x)
-                                   (buffer-string))
-                                 (with-temp-buffer
-                                   (insert-file-contents (concat x ediff-backup-extension))
-                                   (buffer-string))))))
-      (delete-directory tmpdir 'recursive)
-      (delete-file patch))))
+            (let ((backup
+                   (car
+                    (directory-files
+                     tmpdir 'full
+                     (concat (file-name-nondirectory x) ".")))))
+              (should-not
+               (string= (with-temp-buffer
+                          (insert-file-contents x)
+                          (buffer-string))
+                        (with-temp-buffer
+                          (insert-file-contents backup)
+                          (buffer-string))))))
+          (delete-directory tmpdir 'recursive)
+          (delete-file patch)))))
 
 
 (provide 'ediff-ptch-tests)