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 uncounted com...



details:   https://anonhg.NetBSD.org/src/rev/542fb30ec7bc
branches:  trunk
changeset: 1024050:542fb30ec7bc
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Oct 08 20:23:23 2021 +0000

description:
tests/indent: demonstrate uncounted comments

diffstat:

 tests/usr.bin/indent/opt-v.0        |   8 +++++++-
 tests/usr.bin/indent/opt-v.0.stdout |  10 +++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 53a8844749af -r 542fb30ec7bc tests/usr.bin/indent/opt-v.0
--- a/tests/usr.bin/indent/opt-v.0      Fri Oct 08 20:14:52 2021 +0000
+++ b/tests/usr.bin/indent/opt-v.0      Fri Oct 08 20:23:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-v.0,v 1.2 2021/03/07 10:12:18 rillig Exp $ */
+/* $NetBSD: opt-v.0,v 1.3 2021/10/08 20:23:23 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -9,3 +9,9 @@
 {
        printf("A very long message template with %d arguments: %s, %s, %s", 3, "first", "second", "third");
 }
+
+/* $ This comment is neither counted nor formatted. */
+#define macro1 /* prefix */ suffix
+
+/* $ This comment is formatted and counted. */
+#define macro2 prefix /* suffix */
diff -r 53a8844749af -r 542fb30ec7bc tests/usr.bin/indent/opt-v.0.stdout
--- a/tests/usr.bin/indent/opt-v.0.stdout       Fri Oct 08 20:14:52 2021 +0000
+++ b/tests/usr.bin/indent/opt-v.0.stdout       Fri Oct 08 20:23:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-v.0.stdout,v 1.2 2021/03/07 10:12:18 rillig Exp $ */
+/* $NetBSD: opt-v.0.stdout,v 1.3 2021/10/08 20:23:23 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -9,5 +9,9 @@
 {
        printf("A very long message template with %d arguments: %s, %s, %s", 3, "first", "second", "third");
 }
-There were 8 output lines and 1 comments
-(Lines with comments)/(Lines with code):  0.600
+
+#define macro1 /* prefix */ suffix
+
+#define macro2 prefix          /* suffix */
+There were 10 output lines and 2 comments
+(Lines with comments)/(Lines with code):  0.571



Home | Main Index | Thread Index | Old Index