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 inconsistent ...
details: https://anonhg.NetBSD.org/src/rev/75891bbff4fb
branches: trunk
changeset: 1023725:75891bbff4fb
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Sep 24 17:37:55 2021 +0000
description:
tests/indent: demonstrate inconsistent formatting of comments
diffstat:
tests/usr.bin/indent/comments.0 | 13 +++++++------
tests/usr.bin/indent/comments.0.stdout | 3 ++-
tests/usr.bin/indent/opt-fc1.0 | 17 ++++++++++++++++-
tests/usr.bin/indent/opt-fc1.0.stdout | 17 ++++++++++++++++-
tests/usr.bin/indent/opt-nfc1.0 | 17 ++++++++++++++++-
tests/usr.bin/indent/opt-nfc1.0.stdout | 21 ++++++++++++++++++++-
6 files changed, 77 insertions(+), 11 deletions(-)
diffs (166 lines):
diff -r 753dd868126f -r 75891bbff4fb tests/usr.bin/indent/comments.0
--- a/tests/usr.bin/indent/comments.0 Fri Sep 24 16:29:31 2021 +0000
+++ b/tests/usr.bin/indent/comments.0 Fri Sep 24 17:37:55 2021 +0000
@@ -1,5 +1,6 @@
-/* $NetBSD: comments.0,v 1.2 2021/03/14 01:34:13 rillig Exp $ */
+/* $NetBSD: comments.0,v 1.3 2021/09/24 17:37:55 rillig Exp $ */
/* $FreeBSD: head/usr.bin/indent/tests/comments.0 321383 2017-07-23 15:07:52Z pstef $ */
+
typedef enum x {
aaaaaaaaaaaaaaaaaaaaaa = 1 << 0, /* test a */
bbbbbbbbbbbbbbbbb = 1 << 1, /* test b */
@@ -14,22 +15,22 @@
*
* https://www.freebsd.org/cgi/man.cgi?query=indent&apropos=0&sektion=0&manpath=FreeBSD+12-current&arch=default&format=html
*/
-
+
/*
* The default maximum line length for comments is 78, and the 'kk' at
* the end makes the line exactly 78 bytes long.
*
* aaaaaa bbbbbb cccccc dddddd eeeeee ffffff ggggg hhhhh iiiii jjjj kk
*/
-
+
/*
* Old indent unnecessarily removed the star comment continuation on the next line.
- *
+ *
* *test*
*/
-
+
/* r309219 Go through linked list, freeing from the malloced (t[-1]) address. */
-
+
/* r309343 */
}
diff -r 753dd868126f -r 75891bbff4fb tests/usr.bin/indent/comments.0.stdout
--- a/tests/usr.bin/indent/comments.0.stdout Fri Sep 24 16:29:31 2021 +0000
+++ b/tests/usr.bin/indent/comments.0.stdout Fri Sep 24 17:37:55 2021 +0000
@@ -1,5 +1,6 @@
-/* $NetBSD: comments.0.stdout,v 1.2 2021/03/14 01:34:13 rillig Exp $ */
+/* $NetBSD: comments.0.stdout,v 1.3 2021/09/24 17:37:55 rillig Exp $ */
/* $FreeBSD: head/usr.bin/indent/tests/comments.0.stdout 334563 2018-06-03 15:28:55Z pstef $ */
+
typedef enum x {
aaaaaaaaaaaaaaaaaaaaaa = 1 << 0, /* test a */
bbbbbbbbbbbbbbbbb = 1 << 1, /* test b */
diff -r 753dd868126f -r 75891bbff4fb tests/usr.bin/indent/opt-fc1.0
--- a/tests/usr.bin/indent/opt-fc1.0 Fri Sep 24 16:29:31 2021 +0000
+++ b/tests/usr.bin/indent/opt-fc1.0 Fri Sep 24 17:37:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-fc1.0,v 1.2 2021/03/06 21:27:39 rillig Exp $ */
+/* $NetBSD: opt-fc1.0,v 1.3 2021/09/24 17:37:55 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -8,3 +8,18 @@
*
*
*/
+
+/* $ Neither indentation nor surrounding spaces. */
+/*narrow*/
+
+/* $ Indented by a single space, single spaces around the text. */
+ /* space */
+
+/* $ Indented by a single tab, single tabs around the text. */
+ /* tab */
+
+/* $ The space between these comments gets removed. */
+/* block1 */ /* block2 */
+
+/* $ Both comment texts get surrounded by spaces. */
+/*block1*//*block2*/
diff -r 753dd868126f -r 75891bbff4fb tests/usr.bin/indent/opt-fc1.0.stdout
--- a/tests/usr.bin/indent/opt-fc1.0.stdout Fri Sep 24 16:29:31 2021 +0000
+++ b/tests/usr.bin/indent/opt-fc1.0.stdout Fri Sep 24 17:37:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-fc1.0.stdout,v 1.2 2021/03/06 21:27:39 rillig Exp $ */
+/* $NetBSD: opt-fc1.0.stdout,v 1.3 2021/09/24 17:37:55 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -7,3 +7,18 @@
*
*
*/
+
+/* $ The comment text got surrounded by spaces. */
+/* narrow */
+
+/* $ The indentation got removed. */
+/* space */
+
+/* $ The indentation got removed, only the leading tab got replaced by a space. */
+/* tab */
+
+/* $ The space between these comments got removed. */
+/* block1 *//* block2 */
+
+/* $ Both comment texts got surrounded by spaces. */
+/* block1 *//* block2 */
diff -r 753dd868126f -r 75891bbff4fb tests/usr.bin/indent/opt-nfc1.0
--- a/tests/usr.bin/indent/opt-nfc1.0 Fri Sep 24 16:29:31 2021 +0000
+++ b/tests/usr.bin/indent/opt-nfc1.0 Fri Sep 24 17:37:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-nfc1.0,v 1.2 2021/03/06 21:27:39 rillig Exp $ */
+/* $NetBSD: opt-nfc1.0,v 1.3 2021/09/24 17:37:55 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -8,3 +8,18 @@
*
*
*/
+
+/* $ Neither indentation nor surrounding spaces. */
+/*narrow*/
+
+/* $ Indented by a single space, single spaces around the text. */
+ /* space */
+
+/* $ Indented by a single tab, single tabs around the text. */
+ /* tab */
+
+/* $ The space between these comments gets removed. */
+/* block1 */ /* block2 */
+
+/* $ Both comment texts get surrounded by spaces. */
+/*block1*//*block2*/
diff -r 753dd868126f -r 75891bbff4fb tests/usr.bin/indent/opt-nfc1.0.stdout
--- a/tests/usr.bin/indent/opt-nfc1.0.stdout Fri Sep 24 16:29:31 2021 +0000
+++ b/tests/usr.bin/indent/opt-nfc1.0.stdout Fri Sep 24 17:37:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-nfc1.0.stdout,v 1.2 2021/03/06 21:27:39 rillig Exp $ */
+/* $NetBSD: opt-nfc1.0.stdout,v 1.3 2021/09/24 17:37:55 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -8,3 +8,22 @@
*
*
*/
+
+/* $ No spaces got added around the comment text. */
+/*narrow*/
+
+/* $ The indentation of a single space was preserved. */
+/* $ FIXME: The line must not start with a space. */
+ /* space */
+
+/* $ The indentation was changed from a single tab to a single space. */
+/* $ FIXME: The line must not start with a space. */
+ /* tab */
+
+/* $ FIXME: The line must not start with a space. */
+ /* block1 *//* block2 */
+
+/* $ FIXME: The line must not start with a space. */
+/* $ FIXME: It's inconsistent that the first comment gets no spaces. */
+/* $ FIXME: It's inconsistent that the second comment gets spaces. */
+ /*block1*//* block2 */
Home |
Main Index |
Thread Index |
Old Index