Module Name: src Committed By: rillig Date: Sat Oct 23 20:35:18 UTC 2021
Modified Files: src/tests/usr.bin/indent: t_options.awk Log Message: tests/indent: prevent non-comment text to be ignored in the tests To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/indent/t_options.awk 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/t_options.awk diff -u src/tests/usr.bin/indent/t_options.awk:1.1 src/tests/usr.bin/indent/t_options.awk:1.2 --- src/tests/usr.bin/indent/t_options.awk:1.1 Mon Oct 18 20:18:00 2021 +++ src/tests/usr.bin/indent/t_options.awk Sat Oct 23 20:35:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_options.awk,v 1.1 2021/10/18 20:18:00 rillig Exp $ +# $NetBSD: t_options.awk,v 1.2 2021/10/23 20:35:18 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -183,6 +183,10 @@ section == "run" { print $0 > "expected.out" } +section == "" && !/^$/ && !/^#/ && !/^\// && !/^ \*/ { + warn(NR, "non-comment line outside 'input' or 'run' section") +} + END { if (section != "") die(NR, "still in section " quote(section))