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 INDENT comments



details:   https://anonhg.NetBSD.org/src/rev/fe50eacbe2f2
branches:  trunk
changeset: 1023976:fe50eacbe2f2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Oct 05 21:01:10 2021 +0000

description:
tests/indent: test INDENT comments

diffstat:

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

diffs (79 lines):

diff -r 38cd2c47f04d -r fe50eacbe2f2 tests/usr.bin/indent/token-comment.0
--- a/tests/usr.bin/indent/token-comment.0      Tue Oct 05 19:58:38 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0      Tue Oct 05 21:01:10 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0,v 1.4 2021/10/05 18:21:03 rillig Exp $ */
+/* $NetBSD: token-comment.0,v 1.5 2021/10/05 21:01:10 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -118,3 +118,24 @@
 int format( void ) {{{
 /*INDENT ON*/
 }}}
+
+/* INDENT OFF */
+void indent_off ( void ) ;
+/*  INDENT */
+void indent_on ( void ) ;
+/* INDENT OFF */
+void indent_off ( void ) ;
+       /* INDENT ON */
+void indent_on ( void ) ;      /* the comment may be indented */
+/* INDENT              OFF                                     */
+void indent_off ( void ) ;
+/* INDENTATION ON */
+void indent_still_off ( void ) ;       /* due to the word 'INDENTATION' */
+/* INDENT ON * */
+void indent_still_off ( void ) ;       /* due to the extra '*' at the end */
+/* INDENT ON */
+void indent_on ( void ) ;
+/* INDENT: OFF */
+void indent_still_on ( void ) ;        /* due to the colon in the middle */
+/* INDENT OFF */               /* extra comment */
+void indent_still_on ( void ) ;        /* due to the extra comment to the right */
diff -r 38cd2c47f04d -r fe50eacbe2f2 tests/usr.bin/indent/token-comment.0.stdout
--- a/tests/usr.bin/indent/token-comment.0.stdout       Tue Oct 05 19:58:38 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0.stdout       Tue Oct 05 21:01:10 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0.stdout,v 1.5 2021/10/05 18:21:03 rillig Exp $ */
+/* $NetBSD: token-comment.0.stdout,v 1.6 2021/10/05 21:01:10 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -119,3 +119,35 @@
 }
 }
 }
+/* $ FIXME: The empty line disappeared but shouldn't. */
+/* INDENT OFF */
+void indent_off ( void ) ;
+/* $ XXX: The double space from the below comment got merged to a single */
+/* $ XXX: space even though the comment might be regarded to be still in */
+/* $ XXX: the OFF section. */
+/* INDENT */
+void
+indent_on(void);
+/* INDENT OFF */
+void indent_off ( void ) ;
+/* $ XXX: The below comment got moved from column 9 to column 1. */
+/* INDENT ON */
+void
+indent_on(void);               /* the comment may be indented */
+/* INDENT              OFF                                     */
+void indent_off ( void ) ;
+/* INDENTATION ON */
+void indent_still_off ( void ) ;       /* due to the word 'INDENTATION' */
+/* INDENT ON * */
+void indent_still_off ( void ) ;       /* due to the extra '*' at the end */
+/* INDENT ON */
+void
+indent_on(void);
+/* INDENT: OFF */
+void
+indent_still_on(void);         /* due to the colon in the middle */
+/* $ The extra comment got moved to the left since there is no code in */
+/* $ that line. */
+/* INDENT OFF *//* extra comment */
+void
+indent_still_on(void);         /* due to the extra comment to the right */



Home | Main Index | Thread Index | Old Index