diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-14 15:50:55 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-14 15:50:55 +0200 |
commit | 3c053ef14248742726e4a44dc4a809874ce76c72 (patch) | |
tree | 71a1ea158a89fe34549c59cb2f5b60728e4bffb5 /test/lisp/vc | |
parent | 3fd0cc85a58775e0a09efb88649bea9dd28c5491 (diff) | |
download | emacs-3c053ef14248742726e4a44dc4a809874ce76c72.tar.gz emacs-3c053ef14248742726e4a44dc4a809874ce76c72.tar.bz2 emacs-3c053ef14248742726e4a44dc4a809874ce76c72.zip |
Filter out -L foo labels in diff-hunk-file-names
* lisp/vc/diff-mode.el (diff-hunk-file-names): Filter out "-L foo"
labels (bug#10160).
Diffstat (limited to 'test/lisp/vc')
-rw-r--r-- | test/lisp/vc/diff-mode-tests.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lisp/vc/diff-mode-tests.el b/test/lisp/vc/diff-mode-tests.el index 5bc4ad6dace..521865906e7 100644 --- a/test/lisp/vc/diff-mode-tests.el +++ b/test/lisp/vc/diff-mode-tests.el @@ -468,4 +468,16 @@ baz")))) (114 131 (diff-mode syntax face font-lock-string-face)) (134 140 (diff-mode syntax face font-lock-keyword-face)))))))) +(ert-deftest test-hunk-file-names () + (with-temp-buffer + (insert "diff -c /tmp/ange-ftp13518wvE.el /tmp/ange-ftp1351895K.el\n") + (goto-char (point-min)) + (should (equal (diff-hunk-file-names) + '("/tmp/ange-ftp1351895K.el" "/tmp/ange-ftp13518wvE.el")))) + (with-temp-buffer + (insert "diff -c -L /ftp\:slbhao\:/home/albinus/src/tramp/lisp/tramp.el -L /ftp\:slbhao\:/home/albinus/src/emacs/lisp/net/tramp.el /tmp/ange-ftp13518wvE.el /tmp/ange-ftp1351895K.el\n") + (goto-char (point-min)) + (should (equal (diff-hunk-file-names) + '("/tmp/ange-ftp1351895K.el" "/tmp/ange-ftp13518wvE.el"))))) + (provide 'diff-mode-tests) |