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 off-by-one er...



details:   https://anonhg.NetBSD.org/src/rev/d1dbb41c6ed4
branches:  trunk
changeset: 953595:d1dbb41c6ed4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Mar 14 00:50:39 2021 +0000

description:
tests/indent: demonstrate off-by-one error in comment processing

diffstat:

 tests/usr.bin/indent/token-comment.0        |   8 +++++++-
 tests/usr.bin/indent/token-comment.0.stdout |  17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)

diffs (47 lines):

diff -r 4af88a3a814d -r d1dbb41c6ed4 tests/usr.bin/indent/token-comment.0
--- a/tests/usr.bin/indent/token-comment.0      Sun Mar 14 00:33:25 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0      Sun Mar 14 00:50:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0,v 1.1 2021/03/12 00:13:06 rillig Exp $ */
+/* $NetBSD: token-comment.0,v 1.2 2021/03/14 00:50:39 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -8,3 +8,9 @@
  */
 
 /* TODO: Add some code to be formatted. */
+
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 12345 */
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 123456 */
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567 */
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 */
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 */
diff -r 4af88a3a814d -r d1dbb41c6ed4 tests/usr.bin/indent/token-comment.0.stdout
--- a/tests/usr.bin/indent/token-comment.0.stdout       Sun Mar 14 00:33:25 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0.stdout       Sun Mar 14 00:50:39 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0.stdout,v 1.1 2021/03/12 00:13:06 rillig Exp $ */
+/* $NetBSD: token-comment.0.stdout,v 1.2 2021/03/14 00:50:39 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -8,3 +8,18 @@
  */
 
 /* TODO: Add some code to be formatted. */
+
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 12345 */
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 123456 */
+/* 456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567 */
+/* $ XXX: The '12345678' should be kept on the main line since it adds up */
+/* $ XXX: to a line length of exactly 78, which according to the manual */
+/* $ XXX: page should be ok. */
+/*
+ * 456789 123456789 123456789 123456789 123456789 123456789 123456789
+ * 12345678
+ */
+/*
+ * 456789 123456789 123456789 123456789 123456789 123456789 123456789
+ * 123456789
+ */



Home | Main Index | Thread Index | Old Index