Module Name:    src
Committed By:   rillig
Date:           Sun Jun  4 19:28:54 UTC 2023

Modified Files:
        src/tests/usr.bin/indent: lex_ident.c lsym_binary_op.c opt_badp.c

Log Message:
tests/indent: clean up comments


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/indent/lex_ident.c
cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/indent/lsym_binary_op.c
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/indent/opt_badp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/indent/lex_ident.c
diff -u src/tests/usr.bin/indent/lex_ident.c:1.6 src/tests/usr.bin/indent/lex_ident.c:1.7
--- src/tests/usr.bin/indent/lex_ident.c:1.6	Mon May 15 17:28:14 2023
+++ src/tests/usr.bin/indent/lex_ident.c	Sun Jun  4 19:28:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lex_ident.c,v 1.6 2023/05/15 17:28:14 rillig Exp $ */
+/* $NetBSD: lex_ident.c,v 1.7 2023/06/04 19:28:54 rillig Exp $ */
 
 /*
  * Test lexing of word-like tokens, such as keywords, identifiers, numeric
@@ -19,15 +19,13 @@ iable;
 int
 	no_backslash;
 
-/* $ See check_size_token. */
-/* $ The default buffer size is 200, the limit is 195. */
+// $ Test long identifiers, to cover the code that expands a buffer first to
+// $ more than 400 bytes and then to more than 1400 bytes.
 struct long_tag_name_to_overflow_the_token_buffer_4567890\
 12345678901234567890123456789012345678901234567890\
 12345678901234567890123456789012345678901234567890\
 12345678901234567890123456789012345678901234567890;
 
-/* $ See check_size_token. */
-/* $ The difference between limit and start got incremented to 595. */
 struct long_tag_name_to_overflow_the_token_buffer_4567890\
 12345678901234567890123456789012345678901234567890\
 12345678901234567890123456789012345678901234567890\

Index: src/tests/usr.bin/indent/lsym_binary_op.c
diff -u src/tests/usr.bin/indent/lsym_binary_op.c:1.7 src/tests/usr.bin/indent/lsym_binary_op.c:1.8
--- src/tests/usr.bin/indent/lsym_binary_op.c:1.7	Sat May 13 06:52:48 2023
+++ src/tests/usr.bin/indent/lsym_binary_op.c	Sun Jun  4 19:28:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_binary_op.c,v 1.7 2023/05/13 06:52:48 rillig Exp $ */
+/* $NetBSD: lsym_binary_op.c,v 1.8 2023/06/04 19:28:54 rillig Exp $ */
 
 /*
  * Tests for the token lsym_binary_op, which represents a binary operator in
@@ -82,9 +82,9 @@ int var = expr * *ptr;
  * arbitrary amount of '='.  This is used for operators like '&&' or
  * '|||==='.
  *
- * Before 2021-03-07 22:11:01, the comment '//' was treated as an
- * operator as well, and so was the comment '/////', leading to
- * unexpected results.
+ * Before 2021-03-07 22:11:01, the comment '//' was treated as a binary
+ * operator as well, and so was the comment '/////', leading to unexpected
+ * spacing.
  *
  * See lexi.c, lexi, "default:".
  */

Index: src/tests/usr.bin/indent/opt_badp.c
diff -u src/tests/usr.bin/indent/opt_badp.c:1.11 src/tests/usr.bin/indent/opt_badp.c:1.12
--- src/tests/usr.bin/indent/opt_badp.c:1.11	Mon May 15 09:05:08 2023
+++ src/tests/usr.bin/indent/opt_badp.c	Sun Jun  4 19:28:54 2023
@@ -1,10 +1,11 @@
-/* $NetBSD: opt_badp.c,v 1.11 2023/05/15 09:05:08 rillig Exp $ */
+/* $NetBSD: opt_badp.c,v 1.12 2023/06/04 19:28:54 rillig Exp $ */
 
 /*
  * Tests for the options '-badp' and '-nbadp'.
  *
- * The option '-badp' forces a blank line after the first set of declarations
- * in a function. It produces a blank line even if there are no declarations.
+ * The option '-badp' forces a blank line between the first set of declarations
+ * in a function and the next comment or statement. It produces a blank line
+ * even if there are no declarations.
  */
 
 //indent input

Reply via email to