Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.bin/indent tests/indent: demonstrate wrong identif...



details:   https://anonhg.NetBSD.org/src/rev/44aabdc4c777
branches:  trunk
changeset: 1026359:44aabdc4c777
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 20 09:27:18 2021 +0000

description:
tests/indent: demonstrate wrong identifier token (since 2019-04-04)

No matter how simple a piece of code is, without proper automated tests
there is always the chance of breaking it.

diffstat:

 tests/usr.bin/indent/lsym_word.c |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r bd21e82fc835 -r 44aabdc4c777 tests/usr.bin/indent/lsym_word.c
--- a/tests/usr.bin/indent/lsym_word.c  Sat Nov 20 08:48:55 2021 +0000
+++ b/tests/usr.bin/indent/lsym_word.c  Sat Nov 20 09:27:18 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_word.c,v 1.1 2021/11/18 21:19:19 rillig Exp $ */
+/* $NetBSD: lsym_word.c,v 1.2 2021/11/20 09:27:18 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -18,3 +18,18 @@
 #indent end
 
 #indent run-equals-input
+
+
+/*
+ * Since 2019-04-04 and before NetBSD lexi.c 1.149 from 2021-11-20, the first
+ * character after a backslash continuation was always considered part of a
+ * word, no matter whether it was a word character or not.
+ */
+#indent input
+int var\
++name = 4;
+#indent end
+
+#indent run
+int            var+name = 4;
+#indent end



Home | Main Index | Thread Index | Old Index