Module Name: src Committed By: rillig Date: Tue Oct 5 21:01:10 UTC 2021
Modified Files: src/tests/usr.bin/indent: token-comment.0 token-comment.0.stdout Log Message: tests/indent: test INDENT comments To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/token-comment.0 cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/token-comment.0.stdout 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/token-comment.0 diff -u src/tests/usr.bin/indent/token-comment.0:1.4 src/tests/usr.bin/indent/token-comment.0:1.5 --- src/tests/usr.bin/indent/token-comment.0:1.4 Tue Oct 5 18:21:03 2021 +++ src/tests/usr.bin/indent/token-comment.0 Tue Oct 5 21:01:10 2021 @@ -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 @@ function(void) 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 */ Index: src/tests/usr.bin/indent/token-comment.0.stdout diff -u src/tests/usr.bin/indent/token-comment.0.stdout:1.5 src/tests/usr.bin/indent/token-comment.0.stdout:1.6 --- src/tests/usr.bin/indent/token-comment.0.stdout:1.5 Tue Oct 5 18:21:03 2021 +++ src/tests/usr.bin/indent/token-comment.0.stdout Tue Oct 5 21:01:10 2021 @@ -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 @@ int format( void ) {{{ } } } +/* $ 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 */