Module Name: src Committed By: rillig Date: Sat Sep 25 13:04:55 UTC 2021
Modified Files: src/tests/usr.bin/indent: Makefile declarations.0 declarations.0.stdout Added Files: src/tests/usr.bin/indent: declarations.0.stderr Log Message: tests/indent: test deeply nested struct declarations To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/indent/declarations.0 cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/indent/declarations.0.stderr cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/declarations.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/Makefile diff -u src/tests/usr.bin/indent/Makefile:1.10 src/tests/usr.bin/indent/Makefile:1.11 --- src/tests/usr.bin/indent/Makefile:1.10 Sat Sep 25 12:20:44 2021 +++ src/tests/usr.bin/indent/Makefile Sat Sep 25 13:04:55 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2021/09/25 12:20:44 rillig Exp $ +# $NetBSD: Makefile,v 1.11 2021/09/25 13:04:55 rillig Exp $ .include <bsd.own.mk> @@ -16,6 +16,7 @@ FILES+= comments.0 FILES+= comments.0.pro FILES+= comments.0.stdout FILES+= declarations.0 +FILES+= declarations.0.stderr FILES+= declarations.0.stdout FILES+= elsecomment.0 FILES+= elsecomment.0.stdout Index: src/tests/usr.bin/indent/declarations.0 diff -u src/tests/usr.bin/indent/declarations.0:1.2 src/tests/usr.bin/indent/declarations.0:1.3 --- src/tests/usr.bin/indent/declarations.0:1.2 Sat Mar 6 19:51:24 2021 +++ src/tests/usr.bin/indent/declarations.0 Sat Sep 25 13:04:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: declarations.0,v 1.2 2021/03/06 19:51:24 rillig Exp $ */ +/* $NetBSD: declarations.0,v 1.3 2021/09/25 13:04:55 rillig Exp $ */ /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */ /* See r303570 */ @@ -78,3 +78,53 @@ do_execve(td, args, mac_p) { } + +/* Trigger the warning about nested struct declarations. */ +struct s01 { +struct s02 { +struct s03 { +struct s04 { +struct s05 { +struct s06 { +struct s07 { +struct s08 { +struct s09 { +struct s00 { +struct s11 { +struct s12 { +struct s13 { +struct s14 { +struct s15 { +struct s16 { +struct s17 { +struct s18 { +struct s19 { +struct s20 { +struct s21 { +struct s22 { +struct s23 { +struct s24 { +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; +}; Index: src/tests/usr.bin/indent/declarations.0.stdout diff -u src/tests/usr.bin/indent/declarations.0.stdout:1.1 src/tests/usr.bin/indent/declarations.0.stdout:1.2 --- src/tests/usr.bin/indent/declarations.0.stdout:1.1 Thu Apr 4 15:27:35 2019 +++ src/tests/usr.bin/indent/declarations.0.stdout Sat Sep 25 13:04:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: declarations.0.stdout,v 1.1 2019/04/04 15:27:35 kamil Exp $ */ +/* $NetBSD: declarations.0.stdout,v 1.2 2021/09/25 13:04:55 rillig Exp $ */ /* $FreeBSD: head/usr.bin/indent/tests/declarations.0.stdout 334480 2018-06-01 09:58:44Z pstef $ */ /* See r303570 */ @@ -72,3 +72,53 @@ do_execve(td, args, mac_p) { } + +/* Trigger the warning about nested struct declarations. */ +struct s01 { + struct s02 { + struct s03 { + struct s04 { + struct s05 { + struct s06 { + struct s07 { + struct s08 { + struct s09 { + struct s00 { + struct s11 { + struct s12 { + struct s13 { + struct s14 { + struct s15 { + struct s16 { + struct s17 { + struct s18 { + struct s19 { + struct s20 { + struct s21 { + struct s22 { + struct s23 { + struct s24 { + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}; Added files: Index: src/tests/usr.bin/indent/declarations.0.stderr diff -u /dev/null src/tests/usr.bin/indent/declarations.0.stderr:1.1 --- /dev/null Sat Sep 25 13:04:55 2021 +++ src/tests/usr.bin/indent/declarations.0.stderr Sat Sep 25 13:04:55 2021 @@ -0,0 +1,5 @@ +/**INDENT** Warning@95: Reached internal limit of 20 struct levels */ +/**INDENT** Warning@96: Reached internal limit of 20 struct levels */ +/**INDENT** Warning@97: Reached internal limit of 20 struct levels */ +/**INDENT** Warning@98: Reached internal limit of 20 struct levels */ +/**INDENT** Warning@99: Reached internal limit of 20 struct levels */