Module Name: src Committed By: rillig Date: Fri Oct 8 23:53:37 UTC 2021
Modified Files: src/tests/usr.bin/indent: token-comment.0 token-comment.0.stdout Log Message: tests/indent: demonstrate spaces around comment To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/indent/token-comment.0 cvs rdiff -u -r1.7 -r1.8 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.6 src/tests/usr.bin/indent/token-comment.0:1.7 --- src/tests/usr.bin/indent/token-comment.0:1.6 Fri Oct 8 22:11:26 2021 +++ src/tests/usr.bin/indent/token-comment.0 Fri Oct 8 23:53:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: token-comment.0,v 1.6 2021/10/08 22:11:26 rillig Exp $ */ +/* $NetBSD: token-comment.0,v 1.7 2021/10/08 23:53:37 rillig Exp $ */ /* $FreeBSD$ */ /* @@ -151,3 +151,11 @@ There may also be lines without asterisks. */ + +void loop(void) +{ +while(cond)/*comment*/; + + while(cond) + /*comment*/; +} Index: src/tests/usr.bin/indent/token-comment.0.stdout diff -u src/tests/usr.bin/indent/token-comment.0.stdout:1.7 src/tests/usr.bin/indent/token-comment.0.stdout:1.8 --- src/tests/usr.bin/indent/token-comment.0.stdout:1.7 Fri Oct 8 22:11:26 2021 +++ src/tests/usr.bin/indent/token-comment.0.stdout Fri Oct 8 23:53:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: token-comment.0.stdout,v 1.7 2021/10/08 22:11:26 rillig Exp $ */ +/* $NetBSD: token-comment.0.stdout,v 1.8 2021/10/08 23:53:37 rillig Exp $ */ /* $FreeBSD$ */ /* @@ -160,3 +160,14 @@ indent_still_on(void); /* due to the ex * There may also be lines without asterisks. * */ + +void +loop(void) +{ + while (cond) /* comment */ + ; + + while (cond) +/* $ XXX: The spaces around the comment look unintentional. */ + /* comment */ ; +}