Module Name: src Committed By: rillig Date: Thu Nov 18 23:06:51 UTC 2021
Modified Files: src/tests/usr.bin/indent: fmt_decl.c Log Message: tests/indent: demonstrate disappearing function name Since 2019-04-04, as usual. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/indent/fmt_decl.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/fmt_decl.c diff -u src/tests/usr.bin/indent/fmt_decl.c:1.14 src/tests/usr.bin/indent/fmt_decl.c:1.15 --- src/tests/usr.bin/indent/fmt_decl.c:1.14 Thu Nov 18 22:27:01 2021 +++ src/tests/usr.bin/indent/fmt_decl.c Thu Nov 18 23:06:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fmt_decl.c,v 1.14 2021/11/18 22:27:01 rillig Exp $ */ +/* $NetBSD: fmt_decl.c,v 1.15 2021/11/18 23:06:51 rillig Exp $ */ /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */ /* See FreeBSD r303570 */ @@ -481,3 +481,39 @@ yy(void) { } #indent end + + +/* + * Since 2019-04-04, the space between the '){' is missing. + */ +#indent input +int * +function_name_____20________30________40________50 +(void) +{} +#indent end + +/* FIXME: The space between '){' is missing. */ +#indent run +int *function_name_____20________30________40________50 + (void){ +} +#indent end + + +/* + * Since 2019-04-04, some function names are preserved and others are + * silently discarded. + */ +#indent input +int * +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +(void) +{} +#indent end + +/* FIXME: The function name is missing. */ +#indent run +int *(void){ +} +#indent end