[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint 1ea9b91 05/11: Add tests for ineffective backsla
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint 1ea9b91 05/11: Add tests for ineffective backslash check |
Date: |
Sat, 20 Jun 2020 05:57:40 -0400 (EDT) |
branch: externals/relint
commit 1ea9b91bb5c17f3aeac4a2263cd7a68011dc3055
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Add tests for ineffective backslash check
---
test/13.elisp | 17 +++++++++++++++++
test/13.expected | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/test/13.elisp b/test/13.elisp
new file mode 100644
index 0000000..4c6fb35
--- /dev/null
+++ b/test/13.elisp
@@ -0,0 +1,17 @@
+;;; Relint test file 13 -*- emacs-lisp -*-
+
+;; Test ineffective backslashes in strings
+
+(defun f1 ()
+ "doc string with \(silly\) bac\kslashes
+\[that we ignore\]"
+ (list
+ "\more \(bad things\)"
+ "long \<string\>
+\(with mistakes\)
+\{and so on\}"
+ "valid: \\ \" \x5e \172 \u1234 \u00000041 \C-x \M-e \ \
+and \a \b \f \n \r \t \v \d \e \s \^P"))
+
+(defun f2 ()
+ (re-search-forward "\$\.x\+\+"))
diff --git a/test/13.expected b/test/13.expected
new file mode 100644
index 0000000..fd69f6f
--- /dev/null
+++ b/test/13.expected
@@ -0,0 +1,17 @@
+13.elisp:9:5: Ineffective string escape `\m'
+13.elisp:9:11: Ineffective string escape `\('
+13.elisp:9:23: Ineffective string escape `\)'
+13.elisp:10:10: Ineffective string escape `\<'
+13.elisp:10:18: Ineffective string escape `\>'
+13.elisp:11:16: Ineffective string escape `\)'
+13.elisp:12:12: Ineffective string escape `\}'
+13.elisp:17:23: In call to re-search-forward: Unescaped literal `$' (pos 0)
+ "$.x++"
+ ^
+13.elisp:17:23: Ineffective string escape `\$'
+13.elisp:17:25: Ineffective string escape `\.'
+13.elisp:17:28: Ineffective string escape `\+'
+13.elisp:17:30: In call to re-search-forward: Repetition of repetition (pos 4)
+ "$.x++"
+ ....^
+13.elisp:17:30: Ineffective string escape `\+'
- [elpa] externals/relint updated (a54960a -> 0c35e02), Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 6bfba5c 01/11: Always output to stderr when running noninteractively, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 1ea9b91 05/11: Add tests for ineffective backslash check,
Mattias Engdegård <=
- [elpa] externals/relint 0d80c1f 07/11: Rename various 'miscape' identifiers, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint e35fa2e 09/11: Fix doc string predicate, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint e8d8052 03/11: Add checking of ineffective backslashes in string literals, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 329df9c 02/11: Refactor framework, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 2de1106 04/11: Sort diagnostics by buffer position, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint a1c7bf5 06/11: Describe the ineffective backslash warning in README, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0627d4d 08/11: Simplify (and speed up) string scanning regexp, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 0c35e02 11/11: Increment version to 1.18, Mattias Engdegård, 2020/06/20
- [elpa] externals/relint 6a86509 10/11: Tuned miscape filtering, Mattias Engdegård, 2020/06/20