diff options
| author | F. Jason Park | 2022-07-01 05:47:31 -0700 |
|---|---|---|
| committer | F. Jason Park | 2022-07-01 06:20:21 -0700 |
| commit | 0a0ec8958a3026d04101a0501d117a0195df8097 (patch) | |
| tree | f5cf3a03bf0ac837f4d346aa9e713cde82b3f710 /test | |
| parent | 8a098f6517157ebe2364f08008b44ab49c2d1115 (diff) | |
| download | emacs-0a0ec8958a3026d04101a0501d117a0195df8097.tar.gz emacs-0a0ec8958a3026d04101a0501d117a0195df8097.zip | |
; Fix regexp in ERC test-server utility
* test/lisp/erc/resources/erc-d/erc-d-i.el (erc-d-i--tag-unescaped-regexp):
Thanks to Mattias and relint for catching this.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/erc/resources/erc-d/erc-d-i.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/lisp/erc/resources/erc-d/erc-d-i.el b/test/lisp/erc/resources/erc-d/erc-d-i.el index 27b1bf60839..db113335a82 100644 --- a/test/lisp/erc/resources/erc-d/erc-d-i.el +++ b/test/lisp/erc/resources/erc-d/erc-d-i.el | |||
| @@ -39,14 +39,14 @@ UTF-8 text before parsing, which is nonstandard." | |||
| 39 | (defconst erc-d-i--tag-escapes | 39 | (defconst erc-d-i--tag-escapes |
| 40 | '((";" . "\\:") (" " . "\\s") ("\\" . "\\\\") ("\r" . "\\r") ("\n" . "\\n"))) | 40 | '((";" . "\\:") (" " . "\\s") ("\\" . "\\\\") ("\r" . "\\r") ("\n" . "\\n"))) |
| 41 | 41 | ||
| 42 | ;; XXX these are not mirror inverses; unescaping may degenerate | 42 | ;; These are not mirror inverses; unescaping may drop stranded or |
| 43 | ;; original by dropping stranded/misplaced backslashes. | 43 | ;; misplaced backslashes. |
| 44 | 44 | ||
| 45 | (defconst erc-d-i--tag-escaped-regexp (rx (or ?\; ?\ ?\\ ?\r ?\n))) | 45 | (defconst erc-d-i--tag-escaped-regexp (rx (or ?\; ?\ ?\\ ?\r ?\n))) |
| 46 | 46 | ||
| 47 | (defconst erc-d-i--tag-unescaped-regexp | 47 | (defconst erc-d-i--tag-unescaped-regexp |
| 48 | (rx (or "\\:" "\\s" "\\\\" "\\r" "\\n" | 48 | (rx (or "\\:" "\\s" "\\\\" "\\r" "\\n" |
| 49 | (seq "\\" (or string-end (not (or ":" "n" "r" "\\"))))))) | 49 | (seq "\\" (or string-end (not (or ":" "s" "n" "r" "\\"))))))) |
| 50 | 50 | ||
| 51 | (defun erc-d-i--unescape-tag-value (str) | 51 | (defun erc-d-i--unescape-tag-value (str) |
| 52 | "Undo substitution of char placeholders in raw tag value STR." | 52 | "Undo substitution of char placeholders in raw tag value STR." |
| @@ -65,8 +65,6 @@ UTF-8 text before parsing, which is nonstandard." | |||
| 65 | 65 | ||
| 66 | (defconst erc-d-i--invalid-tag-regexp (rx (any "\0\7\r\n; "))) | 66 | (defconst erc-d-i--invalid-tag-regexp (rx (any "\0\7\r\n; "))) |
| 67 | 67 | ||
| 68 | ;; This is `erc-v3-message-tags' with fatal errors. | ||
| 69 | |||
| 70 | (defun erc-d-i--validate-tags (raw) | 68 | (defun erc-d-i--validate-tags (raw) |
| 71 | "Validate tags portion of some RAW incoming message. | 69 | "Validate tags portion of some RAW incoming message. |
| 72 | RAW must not have a leading \"@\" or a trailing space. The spec says | 70 | RAW must not have a leading \"@\" or a trailing space. The spec says |