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: test indentation of neste...
details: https://anonhg.NetBSD.org/src/rev/20342501d170
branches: trunk
changeset: 1023972:20342501d170
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Oct 05 18:21:03 2021 +0000
description:
tests/indent: test indentation of nested declarations and statements
diffstat:
tests/usr.bin/indent/token-comment.0 | 22 +++++++++++++++++++++-
tests/usr.bin/indent/token-comment.0.stdout | 22 +++++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
diffs (86 lines):
diff -r a264c3e515c0 -r 20342501d170 tests/usr.bin/indent/token-comment.0
--- a/tests/usr.bin/indent/token-comment.0 Tue Oct 05 18:09:13 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0 Tue Oct 05 18:21:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0,v 1.3 2021/10/05 18:09:13 rillig Exp $ */
+/* $NetBSD: token-comment.0,v 1.4 2021/10/05 18:21:03 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -77,6 +77,19 @@
int decl; // C99 declaration comment
+ {
+ int decl; /* indented declaration */
+ {
+ int decl; /* indented declaration */
+ {
+ int decl; /* indented declaration */
+ {
+ int decl; /* indented declaration */
+ }
+ }
+ }
+ }
+
code(); /* code comment */
code(); /* short
@@ -91,6 +104,13 @@
* the allowed line width */
code(); // C99 code comment
+
+ if (cond) /* comment */
+ if (cond) /* comment */
+ if (cond) /* comment */
+ if (cond) /* comment */
+ if (cond) /* comment */
+ code(); /* comment */
}
/*INDENT OFF*/
diff -r a264c3e515c0 -r 20342501d170 tests/usr.bin/indent/token-comment.0.stdout
--- a/tests/usr.bin/indent/token-comment.0.stdout Tue Oct 05 18:09:13 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0.stdout Tue Oct 05 18:21:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0.stdout,v 1.4 2021/10/05 18:09:13 rillig Exp $ */
+/* $NetBSD: token-comment.0.stdout,v 1.5 2021/10/05 18:21:03 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -77,6 +77,19 @@
int decl; // C99 declaration comment
+ {
+ int decl; /* indented declaration */
+ {
+ int decl; /* indented declaration */
+ {
+ int decl; /* indented declaration */
+ {
+ int decl; /* indented declaration */
+ }
+ }
+ }
+ }
+
code(); /* code comment */
code(); /* short multi-line code comment */
@@ -88,6 +101,13 @@
* than the allowed line width */
code(); // C99 code comment
+
+ if (cond) /* comment */
+ if (cond) /* comment */
+ if (cond) /* comment */
+ if (cond) /* comment */
+ if (cond) /* comment */
+ code(); /* comment */
}
/* $ FIXME: Missing empty line. */
/*INDENT OFF*/
Home |
Main Index |
Thread Index |
Old Index