Module Name: src Committed By: rillig Date: Fri Oct 29 22:37:25 UTC 2021
Modified Files: src/tests/usr.bin/indent: token_binary_op.c Log Message: tests/indent: test binary operators for tokens in column 1 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/indent/token_binary_op.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/token_binary_op.c diff -u src/tests/usr.bin/indent/token_binary_op.c:1.4 src/tests/usr.bin/indent/token_binary_op.c:1.5 --- src/tests/usr.bin/indent/token_binary_op.c:1.4 Fri Oct 29 21:56:36 2021 +++ src/tests/usr.bin/indent/token_binary_op.c Fri Oct 29 22:37:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: token_binary_op.c,v 1.4 2021/10/29 21:56:36 rillig Exp $ */ +/* $NetBSD: token_binary_op.c,v 1.5 2021/10/29 22:37:25 rillig Exp $ */ /* $FreeBSD$ */ /* @@ -239,3 +239,30 @@ char *(*fn)(int, int) = NULL; /* XXX: The parameter '(int)' is wrongly interpreted as a type cast. */ /* XXX: The parameter '(int, int)' is wrongly interpreted as a type cast. */ #indent run-equals-input -di0 + + +/* + * Ensure that the result of the indentation does not depend on whether a + * token from the input starts in column 1 or 9. + * + * See process_binary_op, ps.prev_col_1. + */ +#indent input +int col_1 // += // +1; + +int col_9 // + = // + 9; +#indent end + +#indent run +int col_1 // += // +1; + +int col_9 // += // +9; +#indent end