diff options
| author | Michael Albinus | 2018-08-10 10:58:00 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-08-10 10:58:00 +0200 |
| commit | 7fbf1247964cbfbbda207e34bfcd5c1863608e74 (patch) | |
| tree | cb62e94606ac0a00d66752694111f635ba838d79 | |
| parent | 9905c927b0c3bea0ae6142b10c83841f077cab67 (diff) | |
| download | emacs-7fbf1247964cbfbbda207e34bfcd5c1863608e74.tar.gz emacs-7fbf1247964cbfbbda207e34bfcd5c1863608e74.zip | |
Another try to fix Bug#32226
* test/lisp/shadowfile-tests.el (shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Use `set-visited-file-name'
instead of setting the value in `buffer-file-name' directly.
(Bug#32226)
| -rw-r--r-- | test/lisp/shadowfile-tests.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el index 22f7b2de6ed..c549ad79a4c 100644 --- a/test/lisp/shadowfile-tests.el +++ b/test/lisp/shadowfile-tests.el | |||
| @@ -618,7 +618,7 @@ guaranteed by the originator of a cluster definition." | |||
| 618 | shadow-test-remote-temporary-file-directory)) | 618 | shadow-test-remote-temporary-file-directory)) |
| 619 | mocked-input `(,cluster1 ,file1 ,cluster2 ,file2 ,(kbd "RET"))) | 619 | mocked-input `(,cluster1 ,file1 ,cluster2 ,file2 ,(kbd "RET"))) |
| 620 | (with-temp-buffer | 620 | (with-temp-buffer |
| 621 | (setq-local buffer-file-name file1) | 621 | (set-visited-file-name file1) |
| 622 | (call-interactively 'shadow-define-literal-group)) | 622 | (call-interactively 'shadow-define-literal-group)) |
| 623 | 623 | ||
| 624 | ;; `shadow-literal-groups' is a list of lists. | 624 | ;; `shadow-literal-groups' is a list of lists. |
| @@ -679,7 +679,7 @@ guaranteed by the originator of a cluster definition." | |||
| 679 | mocked-input `(,(shadow-regexp-superquote file) | 679 | mocked-input `(,(shadow-regexp-superquote file) |
| 680 | ,cluster1 ,cluster2 ,(kbd "RET"))) | 680 | ,cluster1 ,cluster2 ,(kbd "RET"))) |
| 681 | (with-temp-buffer | 681 | (with-temp-buffer |
| 682 | (setq-local buffer-file-name nil) | 682 | (set-visited-file-name nil) |
| 683 | (call-interactively 'shadow-define-regexp-group)) | 683 | (call-interactively 'shadow-define-regexp-group)) |
| 684 | 684 | ||
| 685 | ;; `shadow-regexp-groups' is a list of lists. | 685 | ;; `shadow-regexp-groups' is a list of lists. |
| @@ -756,7 +756,7 @@ guaranteed by the originator of a cluster definition." | |||
| 756 | (message "Point 3") | 756 | (message "Point 3") |
| 757 | ;; Save file from "cluster1" definition. | 757 | ;; Save file from "cluster1" definition. |
| 758 | (with-temp-buffer | 758 | (with-temp-buffer |
| 759 | (setq buffer-file-name file) | 759 | (set-visited-file-name file) |
| 760 | (insert "foo") | 760 | (insert "foo") |
| 761 | (save-buffer)) | 761 | (save-buffer)) |
| 762 | (message "%s" file) | 762 | (message "%s" file) |
| @@ -773,7 +773,7 @@ guaranteed by the originator of a cluster definition." | |||
| 773 | (message "Point 4.1") | 773 | (message "Point 4.1") |
| 774 | (message "%s" file) | 774 | (message "%s" file) |
| 775 | (message "%s" (shadow-site-primary cluster2)) | 775 | (message "%s" (shadow-site-primary cluster2)) |
| 776 | (setq buffer-file-name (concat (shadow-site-primary cluster2) file)) | 776 | (set-visited-file-name (concat (shadow-site-primary cluster2) file)) |
| 777 | (message "Point 4.2") | 777 | (message "Point 4.2") |
| 778 | (insert "foo") | 778 | (insert "foo") |
| 779 | (message "%s" buffer-file-name) | 779 | (message "%s" buffer-file-name) |
| @@ -804,7 +804,7 @@ guaranteed by the originator of a cluster definition." | |||
| 804 | (message "Point 6") | 804 | (message "Point 6") |
| 805 | ;; Save file from "cluster1" definition. | 805 | ;; Save file from "cluster1" definition. |
| 806 | (with-temp-buffer | 806 | (with-temp-buffer |
| 807 | (setq buffer-file-name file) | 807 | (set-visited-file-name file) |
| 808 | (insert "foo") | 808 | (insert "foo") |
| 809 | (save-buffer)) | 809 | (save-buffer)) |
| 810 | (should | 810 | (should |
| @@ -815,7 +815,7 @@ guaranteed by the originator of a cluster definition." | |||
| 815 | (message "Point 7") | 815 | (message "Point 7") |
| 816 | ;; Save file from "cluster2" definition. | 816 | ;; Save file from "cluster2" definition. |
| 817 | (with-temp-buffer | 817 | (with-temp-buffer |
| 818 | (setq buffer-file-name (concat (shadow-site-primary cluster2) file)) | 818 | (set-visited-file-name (concat (shadow-site-primary cluster2) file)) |
| 819 | (insert "foo") | 819 | (insert "foo") |
| 820 | (save-buffer)) | 820 | (save-buffer)) |
| 821 | (should | 821 | (should |
| @@ -892,11 +892,11 @@ guaranteed by the originator of a cluster definition." | |||
| 892 | 892 | ||
| 893 | ;; Save files. | 893 | ;; Save files. |
| 894 | (with-temp-buffer | 894 | (with-temp-buffer |
| 895 | (setq buffer-file-name file) | 895 | (set-visited-file-name file) |
| 896 | (insert "foo") | 896 | (insert "foo") |
| 897 | (save-buffer)) | 897 | (save-buffer)) |
| 898 | (with-temp-buffer | 898 | (with-temp-buffer |
| 899 | (setq buffer-file-name (concat (shadow-site-primary cluster2) file)) | 899 | (set-visited-file-name (concat (shadow-site-primary cluster2) file)) |
| 900 | (insert "foo") | 900 | (insert "foo") |
| 901 | (save-buffer)) | 901 | (save-buffer)) |
| 902 | 902 | ||