mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-04 11:40:22 +00:00
Fix Bug#32226
* lisp/shadowfile.el (shadow-site-name, shadow-name-site): Use "[-.[:word:]]+" as hostname regexp. (Bug#32226) * test/lisp/shadowfile-tests.el (shadow-test06-literal-groups) (shadow-test07-regexp-groups, shadow-test08-shadow-todo) (shadow-test09-shadow-copy-files): Skip if needed.
This commit is contained in:
parent
7308fa0e2b
commit
e0f33ea394
@ -231,12 +231,12 @@ information defining the cluster. For interactive use, call
|
||||
|
||||
(defun shadow-site-name (site)
|
||||
"Return name if SITE has the form \"/name:\", otherwise SITE."
|
||||
(if (string-match "\\`/\\(\\w+\\):\\'" site)
|
||||
(if (string-match "\\`/\\([-.[:word:]]+\\):\\'" site)
|
||||
(match-string 1 site) site))
|
||||
|
||||
(defun shadow-name-site (name)
|
||||
"Return \"/name:\" if NAME has word syntax, otherwise NAME."
|
||||
(if (string-match "\\`\\w+\\'" name)
|
||||
(if (string-match "\\`[-.[:word:]]+\\'" name)
|
||||
(format "/%s:"name) name))
|
||||
|
||||
(defun shadow-site-primary (site)
|
||||
|
@ -556,6 +556,8 @@ guaranteed by the originator of a cluster definition."
|
||||
|
||||
(ert-deftest shadow-test06-literal-groups ()
|
||||
"Check literal group definitions."
|
||||
(skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
|
||||
|
||||
(let ((shadow-info-file shadow-test-info-file)
|
||||
(shadow-todo-file shadow-test-todo-file)
|
||||
shadow-clusters shadow-literal-groups
|
||||
@ -618,6 +620,8 @@ guaranteed by the originator of a cluster definition."
|
||||
|
||||
(ert-deftest shadow-test07-regexp-groups ()
|
||||
"Check regexp group definitions."
|
||||
(skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
|
||||
|
||||
(let ((shadow-info-file shadow-test-info-file)
|
||||
(shadow-todo-file shadow-test-todo-file)
|
||||
shadow-clusters shadow-regexp-groups
|
||||
@ -682,6 +686,8 @@ guaranteed by the originator of a cluster definition."
|
||||
|
||||
(ert-deftest shadow-test08-shadow-todo ()
|
||||
"Check that needed shadows are added to todo."
|
||||
(skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
|
||||
|
||||
(let ((backup-inhibited t)
|
||||
(shadow-info-file shadow-test-info-file)
|
||||
(shadow-todo-file shadow-test-todo-file)
|
||||
@ -780,6 +786,8 @@ guaranteed by the originator of a cluster definition."
|
||||
|
||||
(ert-deftest shadow-test09-shadow-copy-files ()
|
||||
"Check that needed shadow files are copied."
|
||||
(skip-unless (file-remote-p shadow-test-remote-temporary-file-directory))
|
||||
|
||||
(let ((backup-inhibited t)
|
||||
(shadow-info-file shadow-test-info-file)
|
||||
(shadow-todo-file shadow-test-todo-file)
|
||||
|
Loading…
Reference in New Issue
Block a user