Module Name: src Committed By: rillig Date: Fri Jun 9 07:54:05 UTC 2023
Modified Files: src/tests/usr.bin/indent: opt_eei.c Log Message: tests/indent: test extra indentation in expressions To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/indent/opt_eei.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/opt_eei.c diff -u src/tests/usr.bin/indent/opt_eei.c:1.12 src/tests/usr.bin/indent/opt_eei.c:1.13 --- src/tests/usr.bin/indent/opt_eei.c:1.12 Mon May 15 13:33:19 2023 +++ src/tests/usr.bin/indent/opt_eei.c Fri Jun 9 07:54:05 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: opt_eei.c,v 1.12 2023/05/15 13:33:19 rillig Exp $ */ +/* $NetBSD: opt_eei.c,v 1.13 2023/06/09 07:54:05 rillig Exp $ */ /* * Tests for the options '-eei' and '-neei'. @@ -187,3 +187,62 @@ b) ); } //indent end + + +/* + * When multi-line expressions are aligned on the parentheses, they may have an + * ambiguous indentation as well. + */ +//indent input +{ + if (fun( + 1, + 2, + 3)) + stmt; +} +//indent end + +//indent run-equals-input + +//indent run -eei +{ + if (fun( +// $ TODO: Indent one level further. + 1, + 2, + 3)) + stmt; +} +//indent end + + +/* + * + */ +//indent input +{ + if ((( + 3 + ))) + stmt; + if (((( + 4 + )))) + stmt; +} +//indent end + +//indent run -ci2 -nlp -eei +{ + if ((( + 3 + ))) + stmt; +// $ XXX: The indentation of '4' may be considered ambiguous. + if (((( + 4 + )))) + stmt; +} +//indent end