summaryrefslogtreecommitdiffstats
path: root/regress/char
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-06-05 13:54:09 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-06-05 13:54:09 +0000
commit4051ca4c1c6b3fe1989bc59d0c584464e8f8d84b (patch)
treef7dbab9b16049f04a8729b95a4186ce290d13224 /regress/char
parent7e17b66dfe3fa638b5bdaa235a97312af792f229 (diff)
downloadmandoc-4051ca4c1c6b3fe1989bc59d0c584464e8f8d84b.tar.gz
With the improved escape sequence parser, it becomes easy to also improve
diagnostics. Distinguish "incomplete escape sequence", "invalid special character", and "unknown special character" from the generic "invalid escape sequence", also promoting them from WARNING to ERROR because incomplete escape sequences are severe syntax violations and because encountering an invalid or unknown special character makes it likely that part of the document content intended by the authors gets lost.
Diffstat (limited to 'regress/char')
-rw-r--r--regress/char/accent/nocombine.out_lint4
-rw-r--r--regress/char/space/invalid.out_lint16
-rw-r--r--regress/char/unicode/input.out_lint14
-rw-r--r--regress/char/unicode/invalid.out_lint18
4 files changed, 26 insertions, 26 deletions
diff --git a/regress/char/accent/nocombine.out_lint b/regress/char/accent/nocombine.out_lint
index c9de4162..0f7be4d0 100644
--- a/regress/char/accent/nocombine.out_lint
+++ b/regress/char/accent/nocombine.out_lint
@@ -1,2 +1,2 @@
-mandoc: nocombine.in:8:27: WARNING: invalid escape sequence: \[']
-mandoc: nocombine.in:14:27: WARNING: invalid escape sequence: \[`]
+mandoc: nocombine.in:8:27: ERROR: invalid special character: \[']
+mandoc: nocombine.in:14:27: ERROR: invalid special character: \[`]
diff --git a/regress/char/space/invalid.out_lint b/regress/char/space/invalid.out_lint
index c05ef38f..4c146853 100644
--- a/regress/char/space/invalid.out_lint
+++ b/regress/char/space/invalid.out_lint
@@ -1,9 +1,9 @@
mandoc: invalid.in:7:15: WARNING: invalid escape sequence: \[
-mandoc: invalid.in:8:14: WARNING: invalid escape sequence: \[%]
-mandoc: invalid.in:9:16: WARNING: invalid escape sequence: \[&]
-mandoc: invalid.in:10:12: WARNING: invalid escape sequence: \[:]
-mandoc: invalid.in:11:12: WARNING: invalid escape sequence: \[^]
-mandoc: invalid.in:12:16: WARNING: invalid escape sequence: \[_]
-mandoc: invalid.in:13:11: WARNING: invalid escape sequence: \[|]
-mandoc: invalid.in:14:12: WARNING: invalid escape sequence: \[~]
-mandoc: invalid.in:15:18: WARNING: invalid escape sequence: \[0]
+mandoc: invalid.in:8:14: ERROR: invalid special character: \[%]
+mandoc: invalid.in:9:16: ERROR: invalid special character: \[&]
+mandoc: invalid.in:10:12: ERROR: invalid special character: \[:]
+mandoc: invalid.in:11:12: ERROR: invalid special character: \[^]
+mandoc: invalid.in:12:16: ERROR: invalid special character: \[_]
+mandoc: invalid.in:13:11: ERROR: invalid special character: \[|]
+mandoc: invalid.in:14:12: ERROR: invalid special character: \[~]
+mandoc: invalid.in:15:18: ERROR: invalid special character: \[0]
diff --git a/regress/char/unicode/input.out_lint b/regress/char/unicode/input.out_lint
index 578a7704..fa36f876 100644
--- a/regress/char/unicode/input.out_lint
+++ b/regress/char/unicode/input.out_lint
@@ -24,11 +24,11 @@ mandoc: input.in:35:19: ERROR: skipping bad character: 0xbf
mandoc: input.in:42:25: ERROR: skipping bad character: 0xed
mandoc: input.in:42:26: ERROR: skipping bad character: 0xa0
mandoc: input.in:42:27: ERROR: skipping bad character: 0x80
-mandoc: input.in:42:17: WARNING: invalid escape sequence: \[uD800]
+mandoc: input.in:42:17: ERROR: invalid special character: \[uD800]
mandoc: input.in:43:25: ERROR: skipping bad character: 0xed
mandoc: input.in:43:26: ERROR: skipping bad character: 0xbf
mandoc: input.in:43:27: ERROR: skipping bad character: 0xbf
-mandoc: input.in:43:17: WARNING: invalid escape sequence: \[uDFFF]
+mandoc: input.in:43:17: ERROR: invalid special character: \[uDFFF]
mandoc: input.in:53:19: ERROR: skipping bad character: 0xf0
mandoc: input.in:53:20: ERROR: skipping bad character: 0x80
mandoc: input.in:53:21: ERROR: skipping bad character: 0x80
@@ -57,25 +57,25 @@ mandoc: input.in:67:31: ERROR: skipping bad character: 0xf4
mandoc: input.in:67:32: ERROR: skipping bad character: 0x90
mandoc: input.in:67:33: ERROR: skipping bad character: 0x80
mandoc: input.in:67:34: ERROR: skipping bad character: 0x80
-mandoc: input.in:67:21: WARNING: invalid escape sequence: \[u110000]
+mandoc: input.in:67:21: ERROR: invalid special character: \[u110000]
mandoc: input.in:68:31: ERROR: skipping bad character: 0xf4
mandoc: input.in:68:32: ERROR: skipping bad character: 0xbf
mandoc: input.in:68:33: ERROR: skipping bad character: 0xbf
mandoc: input.in:68:34: ERROR: skipping bad character: 0xbf
-mandoc: input.in:68:21: WARNING: invalid escape sequence: \[u13FFFF]
+mandoc: input.in:68:21: ERROR: invalid special character: \[u13FFFF]
mandoc: input.in:69:31: ERROR: skipping bad character: 0xf5
mandoc: input.in:69:32: ERROR: skipping bad character: 0x80
mandoc: input.in:69:33: ERROR: skipping bad character: 0x80
mandoc: input.in:69:34: ERROR: skipping bad character: 0x80
-mandoc: input.in:69:21: WARNING: invalid escape sequence: \[u140000]
+mandoc: input.in:69:21: ERROR: invalid special character: \[u140000]
mandoc: input.in:70:31: ERROR: skipping bad character: 0xf7
mandoc: input.in:70:32: ERROR: skipping bad character: 0xbf
mandoc: input.in:70:33: ERROR: skipping bad character: 0xbf
mandoc: input.in:70:34: ERROR: skipping bad character: 0xbf
-mandoc: input.in:70:21: WARNING: invalid escape sequence: \[u1FFFFF]
+mandoc: input.in:70:21: ERROR: invalid special character: \[u1FFFFF]
mandoc: input.in:71:33: ERROR: skipping bad character: 0xf8
mandoc: input.in:71:34: ERROR: skipping bad character: 0x88
mandoc: input.in:71:35: ERROR: skipping bad character: 0x80
mandoc: input.in:71:36: ERROR: skipping bad character: 0x80
mandoc: input.in:71:37: ERROR: skipping bad character: 0x80
-mandoc: input.in:71:23: WARNING: invalid escape sequence: \[u200000]
+mandoc: input.in:71:23: ERROR: invalid special character: \[u200000]
diff --git a/regress/char/unicode/invalid.out_lint b/regress/char/unicode/invalid.out_lint
index ce9de988..0717605f 100644
--- a/regress/char/unicode/invalid.out_lint
+++ b/regress/char/unicode/invalid.out_lint
@@ -1,9 +1,9 @@
-mandoc: invalid.in:11:13: WARNING: invalid escape sequence: \[u2B]
-mandoc: invalid.in:11:20: WARNING: invalid escape sequence: \[u02B]
-mandoc: invalid.in:13:12: WARNING: invalid escape sequence: \[u0002B]
-mandoc: invalid.in:13:22: WARNING: invalid escape sequence: \[u00002B]
-mandoc: invalid.in:13:33: WARNING: invalid escape sequence: \[u000002B]
-mandoc: invalid.in:14:13: WARNING: invalid escape sequence: \[u110000]
-mandoc: invalid.in:14:24: WARNING: invalid escape sequence: \[u200000]
-mandoc: invalid.in:14:35: WARNING: invalid escape sequence: \[u1000000]
-mandoc: invalid.in:15:20: WARNING: invalid escape sequence: \[u1234g]
+mandoc: invalid.in:11:13: ERROR: unknown special character: \[u2B]
+mandoc: invalid.in:11:20: ERROR: unknown special character: \[u02B]
+mandoc: invalid.in:13:12: ERROR: invalid special character: \[u0002B]
+mandoc: invalid.in:13:22: ERROR: invalid special character: \[u00002B]
+mandoc: invalid.in:13:33: ERROR: unknown special character: \[u000002B]
+mandoc: invalid.in:14:13: ERROR: invalid special character: \[u110000]
+mandoc: invalid.in:14:24: ERROR: invalid special character: \[u200000]
+mandoc: invalid.in:14:35: ERROR: unknown special character: \[u1000000]
+mandoc: invalid.in:15:20: ERROR: unknown special character: \[u1234g]