Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: fix unintended charact...



details:   https://anonhg.NetBSD.org/src/rev/acfae1d658db
branches:  trunk
changeset: 984354:acfae1d658db
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jul 04 13:44:43 2021 +0000

description:
tests/lint: fix unintended character constant in test

I originally intended to type ASCII DEL as an example of a nonprintable
character code.  The actual character that landed in the code was
instead U+2303 "house", which looks similar to the typical
representation of the DEL character.  The UTF-8 byte sequence for that
code point started with \xE2, or in octal \342.

diffstat:

 tests/usr.bin/xlint/lint1/msg_080.c   |  8 +++-----
 tests/usr.bin/xlint/lint1/msg_080.exp |  4 +---
 2 files changed, 4 insertions(+), 8 deletions(-)

diffs (24 lines):

diff -r de7df1ae0b95 -r acfae1d658db tests/usr.bin/xlint/lint1/msg_080.c
--- a/tests/usr.bin/xlint/lint1/msg_080.c       Sun Jul 04 13:32:35 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_080.c       Sun Jul 04 13:44:43 2021 +0000
@@ -1,9 +1,7 @@
-/*     $NetBSD: msg_080.c,v 1.3 2021/06/29 07:17:43 rillig Exp $       */
+/*     $NetBSD: msg_080.c,v 1.4 2021/07/04 13:44:43 rillig Exp $       */
 # 3 "msg_080.c"
 
 // Test for message: dubious escape \%o [80]
 
-/* expect+3: dubious escape \342 [80] */ /* FIXME: Why 342? */
-/* expect+2: multi-character character constant [294] */
-/* expect+1: initializer does not fit */
-char backslash_delete = '\⌂';
+/* expect+1: dubious escape \177 [80] */
+char backslash_delete = '\';
diff -r de7df1ae0b95 -r acfae1d658db tests/usr.bin/xlint/lint1/msg_080.exp
--- a/tests/usr.bin/xlint/lint1/msg_080.exp     Sun Jul 04 13:32:35 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_080.exp     Sun Jul 04 13:44:43 2021 +0000
@@ -1,3 +1,1 @@
-msg_080.c(9): warning: dubious escape \342 [80]
-msg_080.c(9): warning: multi-character character constant [294]
-msg_080.c(9): warning: initializer does not fit [178]
+msg_080.c(7): warning: dubious escape \177 [80]


Home | Main Index | Thread Index | Old Index