Module Name: src Committed By: rillig Date: Sat Oct 16 03:20:13 UTC 2021
Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/indent: Makefile Added Files: src/tests/usr.bin/indent: opt_bacc.c opt_bad.c opt_badp.c opt_bap.c opt_bbb.c opt_bc.c opt_bs.c opt_cdb.c opt_ce.c opt_cs.c opt_dj.c opt_eei.c opt_ei.c opt_fbs.c opt_fc1.c opt_fcb.c opt_ip.c opt_lp.c opt_lpl.c opt_pcs.c opt_psl.c opt_sc.c opt_sob.c opt_ut.c opt_v.c t_options.sh Removed Files: src/tests/usr.bin/indent: opt-bacc.0 opt-bacc.0.pro opt-bacc.0.stdout opt-bad.0 opt-bad.0.pro opt-bad.0.stdout opt-badp.0 opt-badp.0.pro opt-badp.0.stdout opt-bap.0 opt-bap.0.pro opt-bap.0.stdout opt-bbb.0 opt-bbb.0.pro opt-bbb.0.stdout opt-bc.0 opt-bc.0.pro opt-bc.0.stdout opt-bs.0 opt-bs.0.pro opt-bs.0.stdout opt-cdb.0 opt-cdb.0.pro opt-cdb.0.stdout opt-ce.0 opt-ce.0.pro opt-ce.0.stdout opt-cs.0 opt-cs.0.pro opt-cs.0.stdout opt-dj.0 opt-dj.0.pro opt-dj.0.stdout opt-eei.0 opt-eei.0.pro opt-eei.0.stdout opt-ei.0 opt-ei.0.pro opt-ei.0.stdout opt-fbs.0 opt-fbs.0.pro opt-fbs.0.stdout opt-fc1.0 opt-fc1.0.pro opt-fc1.0.stdout opt-fcb.0 opt-fcb.0.pro opt-fcb.0.stdout opt-ip.0 opt-ip.0.pro opt-ip.0.stdout opt-lp.0 opt-lp.0.pro opt-lp.0.stdout opt-lpl.0 opt-lpl.0.pro opt-lpl.0.stdout opt-nbacc.0 opt-nbacc.0.pro opt-nbacc.0.stdout opt-nbad.0 opt-nbad.0.pro opt-nbad.0.stdout opt-nbadp.0 opt-nbadp.0.pro opt-nbadp.0.stdout opt-nbap.0 opt-nbap.0.pro opt-nbap.0.stdout opt-nbbb.0 opt-nbbb.0.pro opt-nbbb.0.stdout opt-nbc.0 opt-nbc.0.pro opt-nbc.0.stdout opt-nbs.0 opt-nbs.0.pro opt-nbs.0.stdout opt-ncdb.0 opt-ncdb.0.pro opt-ncdb.0.stdout opt-nce.0 opt-nce.0.pro opt-nce.0.stdout opt-ncs.0 opt-ncs.0.pro opt-ncs.0.stdout opt-ndj.0 opt-ndj.0.pro opt-ndj.0.stdout opt-neei.0 opt-neei.0.pro opt-neei.0.stdout opt-nei.0 opt-nei.0.pro opt-nei.0.stdout opt-nfbs.0 opt-nfbs.0.pro opt-nfbs.0.stdout opt-nfc1.0 opt-nfc1.0.pro opt-nfc1.0.stdout opt-nfcb.0 opt-nfcb.0.pro opt-nfcb.0.stdout opt-nip.0 opt-nip.0.pro opt-nip.0.stdout opt-nlp.0 opt-nlp.0.pro opt-nlp.0.stdout opt-nlpl.0 opt-nlpl.0.pro opt-nlpl.0.stdout opt-npcs.0 opt-npcs.0.pro opt-npcs.0.stdout opt-npsl.0 opt-npsl.0.pro opt-npsl.0.stdout opt-nsc.0 opt-nsc.0.pro opt-nsc.0.stdout opt-nsob.0 opt-nsob.0.pro opt-nsob.0.stdout opt-nut.0 opt-nut.0.pro opt-nut.0.stdout opt-nv.0 opt-nv.0.pro opt-nv.0.stdout opt-pcs.0 opt-pcs.0.pro opt-pcs.0.stdout opt-psl.0 opt-psl.0.pro opt-psl.0.stdout opt-sc.0 opt-sc.0.pro opt-sc.0.stdout opt-sob.0 opt-sob.0.pro opt-sob.0.stdout opt-ut.0 opt-ut.0.pro opt-ut.0.stdout opt-v.0 opt-v.0.pro opt-v.0.stdout Log Message: tests/indent: condense tests for bool options Previously, each bool option such as '-bacc/-nbacc' had 6 test files: input, options, output for the positive and negative option. Splitting this test data into separate files made it harder than necessary to quickly compare the test output from '-bacc' with that of '-nbacc'. Have a single test for the positive and negative option, allowing several tests to run on the same input with different options. This commit only contains the rather mechanic changes of concatenating the previous test files and inserting the '#indent' directives, which are documented in t_options.sh. Removing duplicate input sections, as well as other cleanups will follow soon. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.1138 -r1.1139 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.15 -r1.16 src/tests/usr.bin/indent/Makefile cvs rdiff -u -r1.3 -r0 src/tests/usr.bin/indent/opt-bacc.0 \ src/tests/usr.bin/indent/opt-bacc.0.stdout \ src/tests/usr.bin/indent/opt-nbacc.0 \ src/tests/usr.bin/indent/opt-nbacc.0.stdout \ src/tests/usr.bin/indent/opt-nsob.0 \ src/tests/usr.bin/indent/opt-nsob.0.stdout \ src/tests/usr.bin/indent/opt-v.0 src/tests/usr.bin/indent/opt-v.0.stdout cvs rdiff -u -r1.1 -r0 src/tests/usr.bin/indent/opt-bacc.0.pro \ src/tests/usr.bin/indent/opt-bad.0.pro \ src/tests/usr.bin/indent/opt-badp.0.pro \ src/tests/usr.bin/indent/opt-bap.0.pro \ src/tests/usr.bin/indent/opt-bbb.0.pro \ src/tests/usr.bin/indent/opt-bc.0.pro \ src/tests/usr.bin/indent/opt-bs.0.pro \ src/tests/usr.bin/indent/opt-cdb.0.pro \ src/tests/usr.bin/indent/opt-ce.0.pro \ src/tests/usr.bin/indent/opt-cs.0.pro \ src/tests/usr.bin/indent/opt-dj.0.pro \ src/tests/usr.bin/indent/opt-eei.0.pro \ src/tests/usr.bin/indent/opt-ei.0.pro \ src/tests/usr.bin/indent/opt-fbs.0.pro \ src/tests/usr.bin/indent/opt-fc1.0.pro \ src/tests/usr.bin/indent/opt-fcb.0.pro \ src/tests/usr.bin/indent/opt-ip.0.pro \ src/tests/usr.bin/indent/opt-lp.0.pro \ src/tests/usr.bin/indent/opt-lpl.0.pro \ src/tests/usr.bin/indent/opt-nbacc.0.pro \ src/tests/usr.bin/indent/opt-nbad.0.pro \ src/tests/usr.bin/indent/opt-nbadp.0.pro \ src/tests/usr.bin/indent/opt-nbap.0.pro \ src/tests/usr.bin/indent/opt-nbbb.0.pro \ src/tests/usr.bin/indent/opt-nbc.0.pro \ src/tests/usr.bin/indent/opt-nbs.0.pro \ src/tests/usr.bin/indent/opt-ncdb.0.pro \ src/tests/usr.bin/indent/opt-nce.0.pro \ src/tests/usr.bin/indent/opt-ncs.0.pro \ src/tests/usr.bin/indent/opt-ndj.0.pro \ src/tests/usr.bin/indent/opt-neei.0.pro \ src/tests/usr.bin/indent/opt-nei.0.pro \ src/tests/usr.bin/indent/opt-nfbs.0.pro \ src/tests/usr.bin/indent/opt-nfc1.0.pro \ src/tests/usr.bin/indent/opt-nfcb.0.pro \ src/tests/usr.bin/indent/opt-nip.0.pro \ src/tests/usr.bin/indent/opt-nlp.0.pro \ src/tests/usr.bin/indent/opt-nlpl.0.pro \ src/tests/usr.bin/indent/opt-npcs.0.pro \ src/tests/usr.bin/indent/opt-npsl.0.pro \ src/tests/usr.bin/indent/opt-nsc.0.pro \ src/tests/usr.bin/indent/opt-nsob.0.pro \ src/tests/usr.bin/indent/opt-nut.0.pro \ src/tests/usr.bin/indent/opt-nv.0.pro \ src/tests/usr.bin/indent/opt-pcs.0.pro \ src/tests/usr.bin/indent/opt-psl.0.pro \ src/tests/usr.bin/indent/opt-sc.0.pro \ src/tests/usr.bin/indent/opt-sob.0.pro \ src/tests/usr.bin/indent/opt-ut.0.pro \ src/tests/usr.bin/indent/opt-v.0.pro cvs rdiff -u -r1.2 -r0 src/tests/usr.bin/indent/opt-bad.0 \ src/tests/usr.bin/indent/opt-bad.0.stdout \ src/tests/usr.bin/indent/opt-badp.0 \ src/tests/usr.bin/indent/opt-badp.0.stdout \ src/tests/usr.bin/indent/opt-bap.0 \ src/tests/usr.bin/indent/opt-bap.0.stdout \ src/tests/usr.bin/indent/opt-bbb.0 \ src/tests/usr.bin/indent/opt-bbb.0.stdout \ src/tests/usr.bin/indent/opt-bc.0 \ src/tests/usr.bin/indent/opt-bc.0.stdout \ src/tests/usr.bin/indent/opt-bs.0 \ src/tests/usr.bin/indent/opt-bs.0.stdout \ src/tests/usr.bin/indent/opt-cdb.0 \ src/tests/usr.bin/indent/opt-cdb.0.stdout \ src/tests/usr.bin/indent/opt-ce.0 \ src/tests/usr.bin/indent/opt-ce.0.stdout \ src/tests/usr.bin/indent/opt-cs.0 \ src/tests/usr.bin/indent/opt-cs.0.stdout \ src/tests/usr.bin/indent/opt-dj.0 \ src/tests/usr.bin/indent/opt-dj.0.stdout \ src/tests/usr.bin/indent/opt-eei.0 \ src/tests/usr.bin/indent/opt-eei.0.stdout \ src/tests/usr.bin/indent/opt-ei.0 \ src/tests/usr.bin/indent/opt-ei.0.stdout \ src/tests/usr.bin/indent/opt-fbs.0 \ src/tests/usr.bin/indent/opt-fbs.0.stdout \ src/tests/usr.bin/indent/opt-fcb.0 \ src/tests/usr.bin/indent/opt-fcb.0.stdout \ src/tests/usr.bin/indent/opt-ip.0 \ src/tests/usr.bin/indent/opt-ip.0.stdout \ src/tests/usr.bin/indent/opt-lp.0 \ src/tests/usr.bin/indent/opt-lp.0.stdout \ src/tests/usr.bin/indent/opt-lpl.0 \ src/tests/usr.bin/indent/opt-lpl.0.stdout \ src/tests/usr.bin/indent/opt-nbad.0 \ src/tests/usr.bin/indent/opt-nbad.0.stdout \ src/tests/usr.bin/indent/opt-nbadp.0 \ src/tests/usr.bin/indent/opt-nbadp.0.stdout \ src/tests/usr.bin/indent/opt-nbap.0 \ src/tests/usr.bin/indent/opt-nbap.0.stdout \ src/tests/usr.bin/indent/opt-nbbb.0 \ src/tests/usr.bin/indent/opt-nbbb.0.stdout \ src/tests/usr.bin/indent/opt-nbc.0 \ src/tests/usr.bin/indent/opt-nbc.0.stdout \ src/tests/usr.bin/indent/opt-nbs.0 \ src/tests/usr.bin/indent/opt-nbs.0.stdout \ src/tests/usr.bin/indent/opt-ncdb.0 \ src/tests/usr.bin/indent/opt-ncdb.0.stdout \ src/tests/usr.bin/indent/opt-nce.0 \ src/tests/usr.bin/indent/opt-nce.0.stdout \ src/tests/usr.bin/indent/opt-ncs.0 \ src/tests/usr.bin/indent/opt-ncs.0.stdout \ src/tests/usr.bin/indent/opt-ndj.0 \ src/tests/usr.bin/indent/opt-ndj.0.stdout \ src/tests/usr.bin/indent/opt-neei.0 \ src/tests/usr.bin/indent/opt-neei.0.stdout \ src/tests/usr.bin/indent/opt-nei.0 \ src/tests/usr.bin/indent/opt-nei.0.stdout \ src/tests/usr.bin/indent/opt-nfbs.0 \ src/tests/usr.bin/indent/opt-nfbs.0.stdout \ src/tests/usr.bin/indent/opt-nfcb.0 \ src/tests/usr.bin/indent/opt-nfcb.0.stdout \ src/tests/usr.bin/indent/opt-nip.0 \ src/tests/usr.bin/indent/opt-nip.0.stdout \ src/tests/usr.bin/indent/opt-nlp.0 \ src/tests/usr.bin/indent/opt-nlp.0.stdout \ src/tests/usr.bin/indent/opt-nlpl.0 \ src/tests/usr.bin/indent/opt-nlpl.0.stdout \ src/tests/usr.bin/indent/opt-npcs.0 \ src/tests/usr.bin/indent/opt-npcs.0.stdout \ src/tests/usr.bin/indent/opt-npsl.0 \ src/tests/usr.bin/indent/opt-npsl.0.stdout \ src/tests/usr.bin/indent/opt-nsc.0 \ src/tests/usr.bin/indent/opt-nsc.0.stdout \ src/tests/usr.bin/indent/opt-nut.0 \ src/tests/usr.bin/indent/opt-nut.0.stdout \ src/tests/usr.bin/indent/opt-nv.0 \ src/tests/usr.bin/indent/opt-nv.0.stdout \ src/tests/usr.bin/indent/opt-pcs.0 \ src/tests/usr.bin/indent/opt-pcs.0.stdout \ src/tests/usr.bin/indent/opt-psl.0 \ src/tests/usr.bin/indent/opt-psl.0.stdout \ src/tests/usr.bin/indent/opt-sc.0 \ src/tests/usr.bin/indent/opt-sc.0.stdout \ src/tests/usr.bin/indent/opt-ut.0 \ src/tests/usr.bin/indent/opt-ut.0.stdout cvs rdiff -u -r1.5 -r0 src/tests/usr.bin/indent/opt-fc1.0 \ src/tests/usr.bin/indent/opt-fc1.0.stdout \ src/tests/usr.bin/indent/opt-nfc1.0 \ src/tests/usr.bin/indent/opt-nfc1.0.stdout cvs rdiff -u -r1.4 -r0 src/tests/usr.bin/indent/opt-sob.0 \ src/tests/usr.bin/indent/opt-sob.0.stdout cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/indent/opt_bacc.c \ src/tests/usr.bin/indent/opt_bad.c src/tests/usr.bin/indent/opt_badp.c \ src/tests/usr.bin/indent/opt_bap.c src/tests/usr.bin/indent/opt_bbb.c \ src/tests/usr.bin/indent/opt_bc.c src/tests/usr.bin/indent/opt_bs.c \ src/tests/usr.bin/indent/opt_cdb.c src/tests/usr.bin/indent/opt_ce.c \ src/tests/usr.bin/indent/opt_cs.c src/tests/usr.bin/indent/opt_dj.c \ src/tests/usr.bin/indent/opt_eei.c src/tests/usr.bin/indent/opt_ei.c \ src/tests/usr.bin/indent/opt_fbs.c src/tests/usr.bin/indent/opt_fc1.c \ src/tests/usr.bin/indent/opt_fcb.c src/tests/usr.bin/indent/opt_ip.c \ src/tests/usr.bin/indent/opt_lp.c src/tests/usr.bin/indent/opt_lpl.c \ src/tests/usr.bin/indent/opt_pcs.c src/tests/usr.bin/indent/opt_psl.c \ src/tests/usr.bin/indent/opt_sc.c src/tests/usr.bin/indent/opt_sob.c \ src/tests/usr.bin/indent/opt_ut.c src/tests/usr.bin/indent/opt_v.c \ src/tests/usr.bin/indent/t_options.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1138 src/distrib/sets/lists/tests/mi:1.1139 --- src/distrib/sets/lists/tests/mi:1.1138 Thu Oct 14 17:42:12 2021 +++ src/distrib/sets/lists/tests/mi Sat Oct 16 03:20:12 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1138 2021/10/14 17:42:12 rillig Exp $ +# $NetBSD: mi,v 1.1139 2021/10/16 03:20:12 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4790,87 +4790,87 @@ ./usr/tests/usr.bin/indent/opt-U.0.list tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-U.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-U.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bacc.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bacc.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bacc.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bad.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bad.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bad.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-badp.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-badp.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-badp.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-bacc.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bacc.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bacc.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bad.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bad.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bad.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-badp.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-badp.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-badp.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-bap+sob.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-bap+sob.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-bap+sob.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bap.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bap.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bap.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bbb.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bbb.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bbb.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bc.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bc.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bc.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-bap.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bap.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bap.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bbb.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bbb.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bbb.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bc.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bc.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bc.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-bl.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-bl.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-bl.0.stdout tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-br.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-br.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-br.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-bs.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-bs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-bs.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-c.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-c.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-c.0.stdout tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-cd.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-cd.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-cd.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-cdb.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-cdb.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-cdb.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ce.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ce.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ce.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-cdb.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-cdb.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-cdb.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ce.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ce.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ce.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-ci.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ci.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ci.0.stdout tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-cli.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-cli.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-cli.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-cs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-cs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-cs.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-cs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-cs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-cs.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-d.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-d.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-d.0.stdout tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-di.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-di.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-di.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-dj.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-dj.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-dj.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-eei.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-eei.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-eei.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ei.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ei.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ei.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fbs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fbs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fbs.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fc1.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fc1.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fc1.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fcb.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fcb.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-fcb.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-dj.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-dj.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-dj.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-eei.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-eei.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-eei.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ei.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ei.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ei.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fbs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fbs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fbs.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fc1.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fc1.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fc1.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fcb.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fcb.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-fcb.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-i.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-i.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-i.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ip.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ip.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ip.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-ip.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ip.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ip.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-l.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-l.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-l.0.stdout tests-usr.bin-tests compattestfile,atf @@ -4880,117 +4880,143 @@ ./usr/tests/usr.bin/indent/opt-ldi.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ldi.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ldi.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-lp.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-lp.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-lp.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-lpl.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-lpl.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-lpl.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbacc.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbacc.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbacc.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbad.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbad.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbad.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbadp.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbadp.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbadp.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbap.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbap.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbap.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbbb.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbbb.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbbb.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbc.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbc.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbc.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nbs.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ncdb.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ncdb.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ncdb.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nce.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nce.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nce.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ncs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ncs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ncs.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ndj.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ndj.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ndj.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-neei.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-neei.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-neei.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nei.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nei.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nei.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfbs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfbs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfbs.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfc1.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfc1.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfc1.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfcb.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfcb.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nfcb.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nip.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nip.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nip.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nlp.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nlp.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nlp.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nlpl.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nlpl.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nlpl.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-npcs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-npcs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-npcs.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-lp.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-lp.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-lp.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-lpl.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-lpl.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-lpl.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbacc.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbacc.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbacc.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbad.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbad.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbad.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbadp.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbadp.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbadp.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbap.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbap.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbap.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbbb.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbbb.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbbb.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbc.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbc.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbc.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nbs.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ncdb.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ncdb.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ncdb.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nce.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nce.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nce.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ncs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ncs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ncs.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ndj.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ndj.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ndj.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-neei.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-neei.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-neei.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nei.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nei.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nei.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfbs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfbs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfbs.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfc1.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfc1.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfc1.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfcb.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfcb.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nfcb.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nip.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nip.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nip.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nlp.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nlp.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nlp.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nlpl.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nlpl.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nlpl.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-npcs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-npcs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-npcs.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-npro.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-npro.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-npro.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-npsl.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-npsl.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-npsl.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nsc.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nsc.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nsc.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nsob.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nsob.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nsob.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nut.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nut.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nut.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nv.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nv.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-nv.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-pcs.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-pcs.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-pcs.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-psl.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-psl.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-psl.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-sc.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-sc.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-sc.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-sob.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-sob.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-sob.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-npsl.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-npsl.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-npsl.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nsc.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nsc.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nsc.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nsob.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nsob.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nsob.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nut.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nut.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nut.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nv.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nv.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-nv.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-pcs.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-pcs.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-pcs.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-psl.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-psl.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-psl.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-sc.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-sc.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-sc.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-sob.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-sob.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-sob.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt-ta.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ta.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ta.0.stdout tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ts.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ts.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt-ts.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ut.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ut.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-ut.0.stdout tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-v.0 tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-v.0.pro tests-usr.bin-tests compattestfile,atf -./usr/tests/usr.bin/indent/opt-v.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt-ut.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ut.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-ut.0.stdout tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-v.0 tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-v.0.pro tests-obsolete obsolete,atf +./usr/tests/usr.bin/indent/opt-v.0.stdout tests-obsolete obsolete,atf ./usr/tests/usr.bin/indent/opt.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/opt.0.stdout tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_bacc.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_bad.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_badp.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_bap.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_bbb.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_bc.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_bs.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_cdb.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_ce.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_cs.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_di.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_dj.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_eei.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_ei.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_fbs.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_fc1.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_fcb.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_ip.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_lp.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_lpl.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_pcs.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_psl.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_sc.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_sob.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_ut.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/indent/opt_v.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/parens.0 tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/parens.0.pro tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/indent/parens.0.stdout tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/indent/Makefile diff -u src/tests/usr.bin/indent/Makefile:1.15 src/tests/usr.bin/indent/Makefile:1.16 --- src/tests/usr.bin/indent/Makefile:1.15 Thu Oct 14 17:42:13 2021 +++ src/tests/usr.bin/indent/Makefile Sat Oct 16 03:20:12 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2021/10/14 17:42:13 rillig Exp $ +# $NetBSD: Makefile,v 1.16 2021/10/16 03:20:12 rillig Exp $ .include <bsd.own.mk> @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/usr.bin/indent TESTS_SH= t_errors TESTS_SH+= t_indent TESTS_SH+= t_misc +TESTS_SH+= t_options FILESDIR= ${TESTSDIR} FILES= binary.0 @@ -65,87 +66,36 @@ FILES+= opt-U.0 FILES+= opt-U.0.list FILES+= opt-U.0.pro FILES+= opt-U.0.stdout -FILES+= opt-bacc.0 -FILES+= opt-bacc.0.pro -FILES+= opt-bacc.0.stdout -FILES+= opt-bad.0 -FILES+= opt-bad.0.pro -FILES+= opt-bad.0.stdout -FILES+= opt-badp.0 -FILES+= opt-badp.0.pro -FILES+= opt-badp.0.stdout FILES+= opt-bap+sob.0 FILES+= opt-bap+sob.0.pro FILES+= opt-bap+sob.0.stdout -FILES+= opt-bap.0 -FILES+= opt-bap.0.pro -FILES+= opt-bap.0.stdout -FILES+= opt-bbb.0 -FILES+= opt-bbb.0.pro -FILES+= opt-bbb.0.stdout -FILES+= opt-bc.0 -FILES+= opt-bc.0.pro -FILES+= opt-bc.0.stdout FILES+= opt-bl.0 FILES+= opt-bl.0.pro FILES+= opt-bl.0.stdout FILES+= opt-br.0 FILES+= opt-br.0.pro FILES+= opt-br.0.stdout -FILES+= opt-bs.0 -FILES+= opt-bs.0.pro -FILES+= opt-bs.0.stdout FILES+= opt-c.0 FILES+= opt-c.0.pro FILES+= opt-c.0.stdout FILES+= opt-cd.0 FILES+= opt-cd.0.pro FILES+= opt-cd.0.stdout -FILES+= opt-cdb.0 -FILES+= opt-cdb.0.pro -FILES+= opt-cdb.0.stdout -FILES+= opt-ce.0 -FILES+= opt-ce.0.pro -FILES+= opt-ce.0.stdout FILES+= opt-ci.0 FILES+= opt-ci.0.pro FILES+= opt-ci.0.stdout FILES+= opt-cli.0 FILES+= opt-cli.0.pro FILES+= opt-cli.0.stdout -FILES+= opt-cs.0 -FILES+= opt-cs.0.pro -FILES+= opt-cs.0.stdout FILES+= opt-d.0 FILES+= opt-d.0.pro FILES+= opt-d.0.stdout FILES+= opt-di.0 FILES+= opt-di.0.pro FILES+= opt-di.0.stdout -FILES+= opt-dj.0 -FILES+= opt-dj.0.pro -FILES+= opt-dj.0.stdout -FILES+= opt-eei.0 -FILES+= opt-eei.0.pro -FILES+= opt-eei.0.stdout -FILES+= opt-ei.0 -FILES+= opt-ei.0.pro -FILES+= opt-ei.0.stdout -FILES+= opt-fbs.0 -FILES+= opt-fbs.0.pro -FILES+= opt-fbs.0.stdout -FILES+= opt-fc1.0 -FILES+= opt-fc1.0.pro -FILES+= opt-fc1.0.stdout -FILES+= opt-fcb.0 -FILES+= opt-fcb.0.pro -FILES+= opt-fcb.0.stdout FILES+= opt-i.0 FILES+= opt-i.0.pro FILES+= opt-i.0.stdout -FILES+= opt-ip.0 -FILES+= opt-ip.0.pro -FILES+= opt-ip.0.stdout FILES+= opt-l.0 FILES+= opt-l.0.pro FILES+= opt-l.0.stdout @@ -155,117 +105,43 @@ FILES+= opt-lc.0.stdout FILES+= opt-ldi.0 FILES+= opt-ldi.0.pro FILES+= opt-ldi.0.stdout -FILES+= opt-lp.0 -FILES+= opt-lp.0.pro -FILES+= opt-lp.0.stdout -FILES+= opt-lpl.0 -FILES+= opt-lpl.0.pro -FILES+= opt-lpl.0.stdout -FILES+= opt-nbacc.0 -FILES+= opt-nbacc.0.pro -FILES+= opt-nbacc.0.stdout -FILES+= opt-nbad.0 -FILES+= opt-nbad.0.pro -FILES+= opt-nbad.0.stdout -FILES+= opt-nbadp.0 -FILES+= opt-nbadp.0.pro -FILES+= opt-nbadp.0.stdout -FILES+= opt-nbap.0 -FILES+= opt-nbap.0.pro -FILES+= opt-nbap.0.stdout -FILES+= opt-nbbb.0 -FILES+= opt-nbbb.0.pro -FILES+= opt-nbbb.0.stdout -FILES+= opt-nbc.0 -FILES+= opt-nbc.0.pro -FILES+= opt-nbc.0.stdout -FILES+= opt-nbs.0 -FILES+= opt-nbs.0.pro -FILES+= opt-nbs.0.stdout -FILES+= opt-ncdb.0 -FILES+= opt-ncdb.0.pro -FILES+= opt-ncdb.0.stdout -FILES+= opt-nce.0 -FILES+= opt-nce.0.pro -FILES+= opt-nce.0.stdout -FILES+= opt-ncs.0 -FILES+= opt-ncs.0.pro -FILES+= opt-ncs.0.stdout -FILES+= opt-ndj.0 -FILES+= opt-ndj.0.pro -FILES+= opt-ndj.0.stdout -FILES+= opt-neei.0 -FILES+= opt-neei.0.pro -FILES+= opt-neei.0.stdout -FILES+= opt-nei.0 -FILES+= opt-nei.0.pro -FILES+= opt-nei.0.stdout -FILES+= opt-nfbs.0 -FILES+= opt-nfbs.0.pro -FILES+= opt-nfbs.0.stdout -FILES+= opt-nfc1.0 -FILES+= opt-nfc1.0.pro -FILES+= opt-nfc1.0.stdout -FILES+= opt-nfcb.0 -FILES+= opt-nfcb.0.pro -FILES+= opt-nfcb.0.stdout -FILES+= opt-nip.0 -FILES+= opt-nip.0.pro -FILES+= opt-nip.0.stdout -FILES+= opt-nlp.0 -FILES+= opt-nlp.0.pro -FILES+= opt-nlp.0.stdout -FILES+= opt-nlpl.0 -FILES+= opt-nlpl.0.pro -FILES+= opt-nlpl.0.stdout -FILES+= opt-npcs.0 -FILES+= opt-npcs.0.pro -FILES+= opt-npcs.0.stdout FILES+= opt-npro.0 FILES+= opt-npro.0.pro FILES+= opt-npro.0.stdout -FILES+= opt-npsl.0 -FILES+= opt-npsl.0.pro -FILES+= opt-npsl.0.stdout -FILES+= opt-nsc.0 -FILES+= opt-nsc.0.pro -FILES+= opt-nsc.0.stdout -FILES+= opt-nsob.0 -FILES+= opt-nsob.0.pro -FILES+= opt-nsob.0.stdout -FILES+= opt-nut.0 -FILES+= opt-nut.0.pro -FILES+= opt-nut.0.stdout -FILES+= opt-nv.0 -FILES+= opt-nv.0.pro -FILES+= opt-nv.0.stdout -FILES+= opt-pcs.0 -FILES+= opt-pcs.0.pro -FILES+= opt-pcs.0.stdout -FILES+= opt-psl.0 -FILES+= opt-psl.0.pro -FILES+= opt-psl.0.stdout -FILES+= opt-sc.0 -FILES+= opt-sc.0.pro -FILES+= opt-sc.0.stdout -FILES+= opt-sob.0 -FILES+= opt-sob.0.pro -FILES+= opt-sob.0.stdout FILES+= opt-ta.0 FILES+= opt-ta.0.pro FILES+= opt-ta.0.stdout FILES+= opt-ts.0 FILES+= opt-ts.0.pro FILES+= opt-ts.0.stdout -FILES+= opt-ut.0 -FILES+= opt-ut.0.pro -FILES+= opt-ut.0.stdout -FILES+= opt-v.0 -FILES+= opt-v.0.pro -FILES+= opt-v.0.stdout FILES+= opt.0 FILES+= opt.0.pro FILES+= opt.0.stdout +FILES+= opt_bacc.c +FILES+= opt_bad.c +FILES+= opt_badp.c +FILES+= opt_bap.c +FILES+= opt_bbb.c +FILES+= opt_bc.c +FILES+= opt_bs.c +FILES+= opt_cdb.c +FILES+= opt_ce.c +FILES+= opt_cs.c +FILES+= opt_dj.c +FILES+= opt_eei.c +FILES+= opt_ei.c +FILES+= opt_fbs.c +FILES+= opt_fc1.c +FILES+= opt_fcb.c +FILES+= opt_ip.c +FILES+= opt_lp.c +FILES+= opt_lpl.c +FILES+= opt_pcs.c +FILES+= opt_psl.c +FILES+= opt_sc.c +FILES+= opt_sob.c +FILES+= opt_ut.c +FILES+= opt_v.c FILES+= parens.0 FILES+= parens.0.stdout FILES+= parens.0.pro Added files: Index: src/tests/usr.bin/indent/opt_bacc.c diff -u /dev/null src/tests/usr.bin/indent/opt_bacc.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_bacc.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,140 @@ +/* $NetBSD: opt_bacc.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* + * Test the option -bacc, which forces a blank line around every conditional + * compilation block. For example, in front of every #ifdef and after every + * #endif. Other blank lines surrounding such blocks are swallowed. + * + * XXX: As of 2021-10-05, the option -bacc has no effect on declarations since + * process_decl resets prefix_blankline_requested unconditionally. + */ + +int a; +#if 0 /* FIXME: need blank line above */ +int b; +#endif /* FIXME: need blank line below */ +int c; + + +int space_a; + +#if 0 /* FIXME: need blank line above */ + +int space_b; /* FIXME: need no blank line above */ + +#endif + +int space_c; + +const char * +os_name(void) +{ +#if defined(__NetBSD__) || defined(__FreeBSD__) + return "BSD"; +#else + return "unknown"; +#endif +} +#indent end + +#indent run -bacc +/* + * Test the option -bacc, which forces a blank line around every conditional + * compilation block. For example, in front of every #ifdef and after every + * #endif. Other blank lines surrounding such blocks are swallowed. + * + * XXX: As of 2021-10-05, the option -bacc has no effect on declarations since + * process_decl resets prefix_blankline_requested unconditionally. + */ + +int a; +#if 0 /* FIXME: need blank line above */ +int b; +#endif /* FIXME: need blank line below */ +int c; + + +int space_a; +#if 0 /* FIXME: need blank line above */ + +int space_b; /* FIXME: need no blank line above */ +#endif + +int space_c; + +/* $ XXX: The '*' should not be set apart from the rest of the return type. */ +const char * +os_name(void) +{ +#if defined(__NetBSD__) || defined(__FreeBSD__) + +/* $ FIXME: This empty line _below_ the '#if' contradicts the manual page. */ + return "BSD"; +#else + +/* $ FIXME: This empty line _below_ the '#else' contradicts the manual page. */ + return "unknown"; +#endif +/* $ FIXME: There should be an empty line after the '#endif'. */ +} +#indent end + +#indent input +int a; +#if 0 +int b; +#endif +int c; + + +int space_a; + +#if 0 + +int space_b; + +#endif + +int space_c; + +const char * +os_name(void) +{ +#if defined(__NetBSD__) || defined(__FreeBSD__) + return "BSD"; +#else + return "unknown"; +#endif +} +#indent end + +#indent run -nbacc +int a; +#if 0 +int b; +#endif +int c; + + +int space_a; + +#if 0 + +int space_b; + +#endif + +int space_c; + +const char * +os_name(void) +{ +#if defined(__NetBSD__) || defined(__FreeBSD__) + return "BSD"; +#else + return "unknown"; +#endif +} +#indent end Index: src/tests/usr.bin/indent/opt_bad.c diff -u /dev/null src/tests/usr.bin/indent/opt_bad.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_bad.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,70 @@ +/* $NetBSD: opt_bad.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* + * The option -bad only affects declarations of local variables. It does not + * affect file-scoped declarations or definitions. + */ + +int global_variable; +void function_declaration(void); +#if 0 +#endif +void function_definition(void) { + int local_variable; + function_call(); + int local_variable_after_statement; + function_call(); +} +#indent end + +#indent run -bad +/* + * The option -bad only affects declarations of local variables. It does not + * affect file-scoped declarations or definitions. + */ + +int global_variable; +void function_declaration(void); +#if 0 +#endif +void +function_definition(void) +{ + int local_variable; + + function_call(); + int local_variable_after_statement; + + function_call(); +} +#indent end + +#indent input +int global_variable; +void function_declaration(void); +#if 0 +#endif +void function_definition(void) { + int local_variable; + function_call(); + int local_variable_after_statement; + function_call(); +} +#indent end + +#indent run -nbad +int global_variable; +void function_declaration(void); +#if 0 +#endif +void +function_definition(void) +{ + int local_variable; + function_call(); + int local_variable_after_statement; + function_call(); +} +#indent end Index: src/tests/usr.bin/indent/opt_badp.c diff -u /dev/null src/tests/usr.bin/indent/opt_badp.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_badp.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,135 @@ +/* $NetBSD: opt_badp.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +static void +no_declarations(void) +{ + action(); +} + +static void +declarations_without_blank_line(void) +{ + int local_variable; + action(); /* FIXME: need empty line above */ +} + +static void +declaration_with_blank_line(void) +{ + int local_variable; + + action(); +} + +static void +declaration_with_several_blank_lines(void) +{ + int local_variable; + + + + action(); +} +#indent end + +#indent run -badp +static void +no_declarations(void) +{ + + action(); +} + +static void +declarations_without_blank_line(void) +{ + int local_variable; + action(); /* FIXME: need empty line above */ +} + +static void +declaration_with_blank_line(void) +{ + int local_variable; + + action(); +} + +static void +declaration_with_several_blank_lines(void) +{ + int local_variable; + + + + action(); +} +#indent end + +#indent input +static void +no_declarations(void) +{ + action(); +} + +static void +declarations_without_blank_line(void) +{ + int local_variable; + action(); +} + +static void +declaration_with_blank_line(void) +{ + int local_variable; + + action(); +} + +static void +declaration_with_several_blank_lines(void) +{ + int local_variable; + + + + action(); +} +#indent end + +#indent run -nbadp +static void +no_declarations(void) +{ + action(); +} + +static void +declarations_without_blank_line(void) +{ + int local_variable; + action(); +} + +static void +declaration_with_blank_line(void) +{ + int local_variable; + + action(); +} + +static void +declaration_with_several_blank_lines(void) +{ + int local_variable; + + + + action(); +} +#indent end Index: src/tests/usr.bin/indent/opt_bap.c diff -u /dev/null src/tests/usr.bin/indent/opt_bap.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_bap.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,108 @@ +/* $NetBSD: opt_bap.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +static void one_liner(void) { /* FIXME: needs empty line below */ } +static void several_lines(void) { + action(); + /* FIXME: needs empty line below */ +} +int main(void){/* FIXME: needs empty line below */} +int global_variable; + +void already_has_blank_line_below(void) +{ +} + +void has_several_blank_lines_below(void) +{ +} + + + +int the_end; +#indent end + +#indent run -bap +static void +one_liner(void) +{ /* FIXME: needs empty line below */ +} +static void +several_lines(void) +{ + action(); + /* FIXME: needs empty line below */ +} +int +main(void) +{ /* FIXME: needs empty line below */ +} +int global_variable; + +void +already_has_blank_line_below(void) +{ +} + +void +has_several_blank_lines_below(void) +{ +} + + + +int the_end; +#indent end + +#indent input +static void one_liner(void) {} +static void several_lines(void) { + action(); +} +int main(void){} +int global_variable; + +void already_has_blank_line_below(void) +{ +} + +void has_several_blank_lines_below(void) +{ +} + + + +int the_end; +#indent end + +#indent run -nbap +static void +one_liner(void) +{ +} +static void +several_lines(void) +{ + action(); +} +int +main(void) +{ +} +int global_variable; + +void +already_has_blank_line_below(void) +{ +} + +void +has_several_blank_lines_below(void) +{ +} + + + +int the_end; +#indent end Index: src/tests/usr.bin/indent/opt_bbb.c diff -u /dev/null src/tests/usr.bin/indent/opt_bbb.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_bbb.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,110 @@ +/* $NetBSD: opt_bbb.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* + * This is a block comment. + */ +/* This is not a block comment since it is single-line. */ +/* + * This is a second block comment. + */ +/* This is not a block comment. */ +/* + * Documentation of global_variable. + */ +int global_variable; +/* + * Documentation of function_declaration. + */ +void function_declaration(void); +/* + * Documentation of function_definition. + */ +void +function_definition(void) +{ +} +#indent end + +#indent run -bbb +/* + * This is a block comment. + */ +/* This is not a block comment since it is single-line. */ + +/* + * This is a second block comment. + */ +/* This is not a block comment. */ + +/* + * Documentation of global_variable. + */ +int global_variable; + +/* + * Documentation of function_declaration. + */ +void function_declaration(void); + +/* + * Documentation of function_definition. + */ +void +function_definition(void) +{ +} +#indent end + +#indent input +/* + * This is a block comment. + */ +/* This is not a block comment since it is single-line. */ +/* + * This is a second block comment. + */ +/* This is not a block comment. */ +/* + * Documentation of global_variable. + */ +int global_variable; +/* + * Documentation of function_declaration. + */ +void function_declaration(void); +/* + * Documentation of function_definition. + */ +void +function_definition(void) +{ +} +#indent end + +#indent run -nbbb +/* + * This is a block comment. + */ +/* This is not a block comment since it is single-line. */ +/* + * This is a second block comment. + */ +/* This is not a block comment. */ +/* + * Documentation of global_variable. + */ +int global_variable; +/* + * Documentation of function_declaration. + */ +void function_declaration(void); +/* + * Documentation of function_definition. + */ +void +function_definition(void) +{ +} +#indent end Index: src/tests/usr.bin/indent/opt_bc.c diff -u /dev/null src/tests/usr.bin/indent/opt_bc.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_bc.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,24 @@ +/* $NetBSD: opt_bc.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +int a,b,c; +void function_declaration(int a,int b,int c); +#indent end + +#indent run -bc +int a, + b, + c; +void function_declaration(int a, int b, int c); +#indent end + +#indent input +int a,b,c; +void function_declaration(int a,int b,int c); +#indent end + +#indent run -nbc +int a, b, c; +void function_declaration(int a, int b, int c); +#indent end Index: src/tests/usr.bin/indent/opt_bs.c diff -u /dev/null src/tests/usr.bin/indent/opt_bs.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_bs.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,70 @@ +/* $NetBSD: opt_bs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void +example(int i) +{ + print(sizeof(i)); + print(sizeof(int)); + + print(sizeof i); + print(sizeof (i)); + print(sizeof (int)); + + print(sizeof i); + print(sizeof (i)); + print(sizeof (int)); +} +#indent end + +#indent run -bs +void +example(int i) +{ + print(sizeof (i)); + print(sizeof (int)); + + print(sizeof i); + print(sizeof (i)); + print(sizeof (int)); + + print(sizeof i); + print(sizeof (i)); + print(sizeof (int)); +} +#indent end + +#indent input +void +example(int i) +{ + print(sizeof(i)); + print(sizeof(int)); + + print(sizeof i); + print(sizeof (i)); + print(sizeof (int)); + + print(sizeof i); + print(sizeof (i)); + print(sizeof (int)); +} +#indent end + +#indent run -nbs +void +example(int i) +{ + print(sizeof(i)); + print(sizeof(int)); + + print(sizeof i); + print(sizeof(i)); + print(sizeof(int)); + + print(sizeof i); + print(sizeof(i)); + print(sizeof(int)); +} +#indent end Index: src/tests/usr.bin/indent/opt_cdb.c diff -u /dev/null src/tests/usr.bin/indent/opt_cdb.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_cdb.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,154 @@ +/* $NetBSD: opt_cdb.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* A single-line comment. */ + +/* A + * multi-line + * comment. */ + +/* + * A + * multi-line + * comment. + */ + +int ga; /* A single-line comment. */ + +int gb; /* A + * multi-line + * comment. */ + +int gc; /* + * A + * multi-line + * comment. + */ + +void +example(void) +{ + /* A single-line comment. */ + int la; + + /* A + * multi-line + * comment. */ + int lb; + + /* + * A + * multi-line + * comment. + */ + int lc; +} +#indent end + +#indent run -cdb +/* A single-line comment. */ + +/* + * A multi-line comment. + */ + +/* + * A multi-line comment. + */ + +int ga; /* A single-line comment. */ + +int gb; /* A multi-line comment. */ + +int gc; /* A multi-line comment. */ + +void +example(void) +{ + /* A single-line comment. */ + int la; + + /* + * A multi-line comment. + */ + int lb; + + /* + * A multi-line comment. + */ + int lc; +} +#indent end + +#indent input +/* A single-line comment. */ + +/* A + * multi-line + * comment. */ + +/* + * A + * multi-line + * comment. + */ + +int ga; /* A single-line comment. */ + +int gb; /* A + * multi-line + * comment. */ + +int gc; /* + * A + * multi-line + * comment. + */ + +void +example(void) +{ + /* A single-line comment. */ + int la; + + /* A + * multi-line + * comment. */ + int lb; + + /* + * A + * multi-line + * comment. + */ + int lc; +} +#indent end + +#indent run -ncdb +/* A single-line comment. */ + +/* A multi-line comment. */ + +/* A multi-line comment. */ + +int ga; /* A single-line comment. */ + +int gb; /* A multi-line comment. */ + +int gc; /* A multi-line comment. */ + +void +example(void) +{ + /* A single-line comment. */ + int la; + + /* A multi-line comment. */ + int lb; + + /* A multi-line comment. */ + int lc; +} +#indent end Index: src/tests/usr.bin/indent/opt_ce.c diff -u /dev/null src/tests/usr.bin/indent/opt_ce.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_ce.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,58 @@ +/* $NetBSD: opt_ce.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void +example(int n) +{ + if (n > 99) { print("large"); } + else if (n > 9) { print("double-digit"); } + else if (n > 0) print("positive"); + else { print("negative"); } +} +#indent end + +#indent run -ce +void +example(int n) +{ + if (n > 99) { + print("large"); + } else if (n > 9) { + print("double-digit"); + } else if (n > 0) + print("positive"); + else { + print("negative"); + } +} +#indent end + +#indent input +void +example(int n) +{ + if (n > 99) { print("large"); } + else if (n > 9) { print("double-digit"); } + else if (n > 0) print("positive"); + else { print("negative"); } +} +#indent end + +#indent run -nce +void +example(int n) +{ + if (n > 99) { + print("large"); + } + else if (n > 9) { + print("double-digit"); + } + else if (n > 0) + print("positive"); + else { + print("negative"); + } +} +#indent end Index: src/tests/usr.bin/indent/opt_cs.c diff -u /dev/null src/tests/usr.bin/indent/opt_cs.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_cs.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,26 @@ +/* $NetBSD: opt_cs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +int i0 = (int)3.0; +int i1 = (int) 3.0; +int i3 = (int) 3.0; +#indent end + +#indent run -cs +int i0 = (int) 3.0; +int i1 = (int) 3.0; +int i3 = (int) 3.0; +#indent end + +#indent input +int i0 = (int)3.0; +int i1 = (int) 3.0; +int i3 = (int) 3.0; +#indent end + +#indent run -ncs +int i0 = (int)3.0; +int i1 = (int)3.0; +int i3 = (int)3.0; +#indent end Index: src/tests/usr.bin/indent/opt_dj.c diff -u /dev/null src/tests/usr.bin/indent/opt_dj.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_dj.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,42 @@ +/* $NetBSD: opt_dj.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +int i; +int *ip; +const char *ccp; +const void *****vppppp; +const void ******vpppppp; +const void ********vpppppppp; +#indent end + +#indent run -dj +int i; +int *ip; +const char *ccp; +const void *****vppppp; +const void ******vpppppp; +const void ********vpppppppp; +#indent end + +#indent input +/* FIXME: The options -dj and -ndj produce the same output. */ + +int i; +int *ip; +const char *ccp; +const void *****vppppp; +const void ******vpppppp; +const void ********vpppppppp; +#indent end + +#indent run -ndj +/* FIXME: The options -dj and -ndj produce the same output. */ + +int i; +int *ip; +const char *ccp; +const void *****vppppp; +const void ******vpppppp; +const void ********vpppppppp; +#indent end Index: src/tests/usr.bin/indent/opt_eei.c diff -u /dev/null src/tests/usr.bin/indent/opt_eei.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_eei.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,58 @@ +/* $NetBSD: opt_eei.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +bool +less(int a, int b) +{ + if (a < + b) + return true; + if (a + < + b) + return true; +} +#indent end + +#indent run -eei +bool +less(int a, int b) +{ + if (a < + b) + return true; + if (a + < + b) + return true; +} +#indent end + +#indent input +bool +less(int a, int b) +{ + if (a < + b) + return true; + if (a + < + b) + return true; +} +#indent end + +#indent run -neei +bool +less(int a, int b) +{ + if (a < + b) + return true; + if (a + < + b) + return true; +} +#indent end Index: src/tests/usr.bin/indent/opt_ei.c diff -u /dev/null src/tests/usr.bin/indent/opt_ei.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_ei.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,68 @@ +/* $NetBSD: opt_ei.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void +example(int n) +{ + if (n > 99) { + print("large"); + } else if (n > 9) { + print("double-digit"); + } else if (n > 0) + print("positive"); + else { + print("negative"); + } +} +#indent end + +#indent run -ei +void +example(int n) +{ + if (n > 99) { + print("large"); + } else if (n > 9) { + print("double-digit"); + } else if (n > 0) + print("positive"); + else { + print("negative"); + } +} +#indent end + +#indent input +void +example(int n) +{ + if (n > 99) { + print("large"); + } else if (n > 9) { + print("double-digit"); + } else if (n > 0) + print("positive"); + else { + print("negative"); + } +} +#indent end + +#indent run -nei +void +example(int n) +{ + if (n > 99) { + print("large"); + } else + if (n > 9) { + print("double-digit"); + } else + if (n > 0) + print("positive"); + else { + print("negative"); + } +} +#indent end Index: src/tests/usr.bin/indent/opt_fbs.c diff -u /dev/null src/tests/usr.bin/indent/opt_fbs.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_fbs.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,23 @@ +/* $NetBSD: opt_fbs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void example(int n) {} +#indent end + +#indent run -fbs +void +example(int n) +{ +} +#indent end + +#indent input +void example(int n) {} +#indent end + +#indent run -nfbs +void +example(int n) { +} +#indent end Index: src/tests/usr.bin/indent/opt_fc1.c diff -u /dev/null src/tests/usr.bin/indent/opt_fc1.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_fc1.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,161 @@ +/* $NetBSD: opt_fc1.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* + * A comment + * in column 1. + * + * + * + */ + +/* $ Neither indentation nor surrounding spaces. */ +/*narrow*/ + +/* $ Indented by a single space, single spaces around the text. */ + /* space */ + +/* $ Indented by a single tab, single tabs around the text. */ + /* tab */ + +/* $ The space between these comments gets removed. */ +/* block1 */ /* block2 */ + +/* $ Both comment texts get surrounded by spaces. */ +/*block1*//*block2*/ + +/* + * A multi-line comment that starts + * in column 1. + *//* followed by another multi-line comment + * that starts in column 4. + */ + +/* comment */ int decl2; /* comment */ +/* looooooooooooooooooooooooooooooooooooooooong first comment */ int decl2; /* second comment */ +/* first comment */ int decl2; /* looooooooooooooooooooooooooooooooooooooooong second comment */ +#indent end + +#indent run -fc1 +/* + * A comment in column 1. + * + * + * + */ + +/* $ The comment text got surrounded by spaces. */ +/* narrow */ + +/* $ The indentation got removed. */ +/* space */ + +/* $ The indentation got removed, only the leading tab got replaced by a space. */ +/* tab */ + +/* $ The space between these comments got removed. */ +/* block1 *//* block2 */ + +/* $ Both comment texts got surrounded by spaces. */ +/* block1 *//* block2 */ + +/* + * A multi-line comment that starts in column 1. + * + * followed by another multi-line comment that starts in column 4. + */ +/* $ XXX: The two comments have been merged into a single comment. */ + + /* comment */ int decl2; /* comment */ + /* looooooooooooooooooooooooooooooooooooooooong first comment */ int decl2; /* second comment */ + /* first comment */ int decl2; /* looooooooooooooooooooooooooooooooooooooooong + * second comment */ +#indent end + +#indent input +/* + * A comment + * in column 1. + * + * + * + */ + +/* $ Neither indentation nor surrounding spaces. */ +/*narrow*/ + +/* $ Indented by a single space, single spaces around the text. */ + /* space */ + +/* $ Indented by a single tab, single tabs around the text. */ + /* tab */ + +/* $ The space between these comments gets removed. */ +/* block1 */ /* block2 */ + +/* $ Both comment texts get surrounded by spaces. */ +/*block1*//*block2*/ + +/* + * A multi-line comment that starts + * in column 1. + *//* followed by another multi-line comment + * that starts in column 4. + */ + +/* comment */ int decl2; /* comment */ +/* looooooooooooooooooooooooooooooooooooooooong first comment */ int decl2; /* second comment */ +/* first comment */ int decl2; /* looooooooooooooooooooooooooooooooooooooooong second comment */ +#indent end + +#indent run -nfc1 +/* + * A comment + * in column 1. + * + * + * + */ + +/* $ No spaces got added around the comment text. */ +/*narrow*/ + +/* $ The indentation of a single space was preserved. */ +/* $ If the comment were moved to column 1, it would change from the area */ +/* $ of 'comments that may be formatted' to the area of 'comments that must */ +/* $ not be formatted. The indentation of a single space prevents this. */ + /* space */ + +/* $ The indentation was changed from a single tab to a single space. */ + /* tab */ + +/* $ The space between these two comments got removed. */ +/* $ XXX: The option '-nfc1' says that comments in column 1 do not get */ +/* $ formatted, but the comment 'block1' was moved from column 1 to 2. */ +/* $ This is probably because there is a second comment in the same line. */ + /* block1 *//* block2 */ + +/* $ It may seem strange at first that the left comment is not touched */ +/* $ but the right comment gets spaces added. This difference is the */ +/* $ exact purpose of the option '-nfc1', which says "do not touch comments */ +/* $ that start in column 1. The first comment starts in column 1, the */ +/* $ second comment doesn't. */ +/* $ XXX: The option '-nfc1' says that comments in column 1 do not get */ +/* $ formatted, but the comment 'block1' was moved from column 1 to 2. */ +/* $ This is probably because there is a second comment in the same line. */ + /*block1*//* block2 */ + +/* + * A multi-line comment that starts + * in column 1. + * + * followed by another multi-line comment that starts in column 4. + */ +/* $ XXX: The two comments have been merged into a single comment. */ + + /* comment */ int decl2; /* comment */ + /* looooooooooooooooooooooooooooooooooooooooong first comment */ int decl2; /* second comment */ + /* first comment */ int decl2; /* looooooooooooooooooooooooooooooooooooooooong + * second comment */ +#indent end Index: src/tests/usr.bin/indent/opt_fcb.c diff -u /dev/null src/tests/usr.bin/indent/opt_fcb.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_fcb.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,130 @@ +/* $NetBSD: opt_fcb.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* FIXME: The options -fcb and -nfcb result in exactly the same output. */ + +/* Not + * + * so carefully + * formatted + * comment */ + +/*- + * car mat men + * efu for ted com t + * lly box . + */ + +void +example(void) +{ + /* Not + * + * so carefully + * formatted + * comment */ + + /*- + * car mat men + * efu for ted com t + * lly box . + */ +} +#indent end + +#indent run -fcb +/* FIXME: The options -fcb and -nfcb result in exactly the same output. */ + +/* + * Not + * + * so carefully formatted comment + */ + +/*- + * car mat men + * efu for ted com t + * lly box . + */ + +void +example(void) +{ + /* + * Not + * + * so carefully formatted comment + */ + + /*- + * car mat men + * efu for ted com t + * lly box . + */ +} +#indent end + +#indent input +/* FIXME: The options -fcb and -nfcb result in exactly the same output. */ + +/* Not + * + * so carefully + * formatted + * comment */ + +/*- + * car mat men + * efu for ted com t + * lly box . + */ + +void +example(void) +{ + /* Not + * + * so carefully + * formatted + * comment */ + + /*- + * car mat men + * efu for ted com t + * lly box . + */ +} +#indent end + +#indent run -nfcb +/* FIXME: The options -fcb and -nfcb result in exactly the same output. */ + +/* + * Not + * + * so carefully formatted comment + */ + +/*- + * car mat men + * efu for ted com t + * lly box . + */ + +void +example(void) +{ + /* + * Not + * + * so carefully formatted comment + */ + + /*- + * car mat men + * efu for ted com t + * lly box . + */ +} +#indent end Index: src/tests/usr.bin/indent/opt_ip.c diff -u /dev/null src/tests/usr.bin/indent/opt_ip.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_ip.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,86 @@ +/* $NetBSD: opt_ip.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* FIXME: The options -ip and -nip produce the same output. */ + +int +several_parameters_1(int a, +int b, +const char *cp); + +int +several_parameters_2( +int a, +int b, +const char *cp); + +int +several_parameters_3( +int a1, int a2, +int b1, int b2, +const char *cp); +#indent end + +#indent run -ip +/* FIXME: The options -ip and -nip produce the same output. */ + +int +several_parameters_1(int a, + int b, + const char *cp); + +int +several_parameters_2( + int a, + int b, + const char *cp); + +int +several_parameters_3( + int a1, int a2, + int b1, int b2, + const char *cp); +#indent end + +#indent input +/* FIXME: The options -ip and -nip produce the same output. */ + +int +several_parameters_1(int a, +int b, +const char *cp); + +int +several_parameters_2( +int a, +int b, +const char *cp); + +int +several_parameters_3( +int a1, int a2, +int b1, int b2, +const char *cp); +#indent end + +#indent run -nip +/* FIXME: The options -ip and -nip produce the same output. */ + +int +several_parameters_1(int a, + int b, + const char *cp); + +int +several_parameters_2( + int a, + int b, + const char *cp); + +int +several_parameters_3( + int a1, int a2, + int b1, int b2, + const char *cp); +#indent end Index: src/tests/usr.bin/indent/opt_lp.c diff -u /dev/null src/tests/usr.bin/indent/opt_lp.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_lp.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,58 @@ +/* $NetBSD: opt_lp.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void +example(void) +{ + p1 = first_procedure(second_procedure(p2, p3), + third_procedure(p4, p5)); + + p1 = first_procedure(second_procedure(p2, + p3), + third_procedure(p4, + p5)); +} +#indent end + +#indent run -lp +void +example(void) +{ + p1 = first_procedure(second_procedure(p2, p3), + third_procedure(p4, p5)); + + p1 = first_procedure(second_procedure(p2, + p3), + third_procedure(p4, + p5)); +} +#indent end + +#indent input +void +example(void) +{ + p1 = first_procedure(second_procedure(p2, p3), + third_procedure(p4, p5)); + + p1 = first_procedure(second_procedure(p2, + p3), + third_procedure(p4, + p5)); +} +#indent end + +#indent run -nlp +void +example(void) +{ + p1 = first_procedure(second_procedure(p2, p3), + third_procedure(p4, p5)); + + p1 = first_procedure(second_procedure(p2, + p3), + third_procedure(p4, + p5)); +} +#indent end Index: src/tests/usr.bin/indent/opt_lpl.c diff -u /dev/null src/tests/usr.bin/indent/opt_lpl.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_lpl.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,104 @@ +/* $NetBSD: opt_lpl.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void +example(void) +{ + int sum1 = 1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21; + int sum2 = (1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21); + + int sum3 = 1+2+3+4+5+ + 6+7+8+9+10+ + 11+12+13+14+15+ + 16+17+18+19+20+ + 21; + int sum4 = (1+2+3+4+5+ + 6+7+8+9+10+ + 11+12+13+14+15+ + 16+17+18+19+20+ + 21); + + call_function(call_function(call_function(call_function(call_function(call_function()))))); + + call_function((call_function(call_function(call_function(call_function(call_function())))))); +} +#indent end + +#indent run -lpl +/* $ TODO: Add code that differs between -lpl and -nlpl. */ +void +example(void) +{ + int sum1 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21; + int sum2 = (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21); + +/* $ XXX: There should be at least _some_ indentation for the */ +/* $ continuation lines. */ + int sum3 = 1 + 2 + 3 + 4 + 5 + + 6 + 7 + 8 + 9 + 10 + + 11 + 12 + 13 + 14 + 15 + + 16 + 17 + 18 + 19 + 20 + + 21; + int sum4 = (1 + 2 + 3 + 4 + 5 + + 6 + 7 + 8 + 9 + 10 + + 11 + 12 + 13 + 14 + 15 + + 16 + 17 + 18 + 19 + 20 + + 21); + + call_function(call_function(call_function(call_function(call_function(call_function()))))); + + call_function((call_function(call_function(call_function(call_function(call_function())))))); +} +#indent end + +#indent input +void +example(void) +{ + int sum1 = 1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21; + int sum2 = (1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21); + + int sum3 = 1+2+3+4+5+ + 6+7+8+9+10+ + 11+12+13+14+15+ + 16+17+18+19+20+ + 21; + int sum4 = (1+2+3+4+5+ + 6+7+8+9+10+ + 11+12+13+14+15+ + 16+17+18+19+20+ + 21); + + call_function(call_function(call_function(call_function(call_function(call_function()))))); + + call_function((call_function(call_function(call_function(call_function(call_function())))))); +} +#indent end + +#indent run -nlpl +/* $ TODO: Add code that differs between -lpl and -nlpl. */ +void +example(void) +{ + int sum1 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21; + int sum2 = (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21); + +/* $ XXX: There should be at least _some_ indentation for the */ +/* $ continuation lines. */ + int sum3 = 1 + 2 + 3 + 4 + 5 + + 6 + 7 + 8 + 9 + 10 + + 11 + 12 + 13 + 14 + 15 + + 16 + 17 + 18 + 19 + 20 + + 21; + int sum4 = (1 + 2 + 3 + 4 + 5 + + 6 + 7 + 8 + 9 + 10 + + 11 + 12 + 13 + 14 + 15 + + 16 + 17 + 18 + 19 + 20 + + 21); + + call_function(call_function(call_function(call_function(call_function(call_function()))))); + + call_function((call_function(call_function(call_function(call_function(call_function())))))); +} +#indent end Index: src/tests/usr.bin/indent/opt_pcs.c diff -u /dev/null src/tests/usr.bin/indent/opt_pcs.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_pcs.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,42 @@ +/* $NetBSD: opt_pcs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void +example(void) +{ + function_call(); + function_call(1); + function_call(1,2,3); +} +#indent end + +#indent run -pcs +void +example(void) +{ + function_call (); + function_call (1); + function_call (1, 2, 3); +} +#indent end + +#indent input +void +example(void) +{ + function_call(); + function_call(1); + function_call(1,2,3); +} +#indent end + +#indent run -npcs +void +example(void) +{ + function_call(); + function_call(1); + function_call(1, 2, 3); +} +#indent end Index: src/tests/usr.bin/indent/opt_psl.c diff -u /dev/null src/tests/usr.bin/indent/opt_psl.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_psl.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,31 @@ +/* $NetBSD: opt_psl.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +void function_declaration(void); + +void function_definition(void) {} +#indent end + +#indent run -psl +void function_declaration(void); + +void +function_definition(void) +{ +} +#indent end + +#indent input +void function_declaration(void); + +void function_definition(void) {} +#indent end + +#indent run -npsl +void function_declaration(void); + +void function_definition(void) +{ +} +#indent end Index: src/tests/usr.bin/indent/opt_sc.c diff -u /dev/null src/tests/usr.bin/indent/opt_sc.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_sc.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,62 @@ +/* $NetBSD: opt_sc.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* comment +without +asterisks +*/ + +/* +** This comment style is used by Lua. +*/ + +/** + * Javadoc, adopted by several other programming languages. + */ +#indent end + +#indent run -sc +/* + * comment without asterisks + */ + +/* $ XXX: The additional '*' is debatable. */ +/* + * * This comment style is used by Lua. + */ + +/** + * Javadoc, adopted by several other programming languages. + */ +#indent end + +#indent input +/* comment +without +asterisks +*/ + +/* +** This comment style is used by Lua. +*/ + +/** + * Javadoc, adopted by several other programming languages. + */ +#indent end + +#indent run -nsc +/* +comment without asterisks + */ + +/* $ This comment, as rewritten by indent, is not actually used by Lua. */ +/* + * This comment style is used by Lua. + */ + +/** + * Javadoc, adopted by several other programming languages. + */ +#indent end Index: src/tests/usr.bin/indent/opt_sob.c diff -u /dev/null src/tests/usr.bin/indent/opt_sob.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_sob.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,221 @@ +/* $NetBSD: opt_sob.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* $ FIXME: There are lots of 'optional blank lines' here that should */ +/* $ FIXME: be swallowed. */ +void function_declaration(void); + + +int +function_with_0_blank_lines(void) +{ + int var; + var = value; + if (var > 0) + var--; + return var; +} + +int +function_with_1_blank_line(void) +{ + + int var; + + var = value; + + if (var > 0) +/* $ The following line is "optional" and is removed due to '-sob'. */ + + var--; + + return var; + +} + + +int +function_with_2_blank_lines(void) +{ + + + int var; + + + var = value; + + + if (var > 0) +/* $ The following 2 lines are "optional" and are removed due to '-sob'. */ + + + var--; + + + return var; + + +} +#indent end + +#indent run -sob +void function_declaration(void); + + +int +function_with_0_blank_lines(void) +{ + int var; + var = value; + if (var > 0) + var--; + return var; +} + +int +function_with_1_blank_line(void) +{ + + int var; + + var = value; + + if (var > 0) + var--; + + return var; + +} + + +int +function_with_2_blank_lines(void) +{ + + + int var; + + + var = value; + + + if (var > 0) + var--; + + + return var; + + +} +#indent end + +#indent input +void function_declaration(void); + + +int +function_with_0_blank_lines(void) +{ + int var; + var = value; + if (var > 0) + var--; + return var; +} + +int +function_with_1_blank_line(void) +{ + + int var; + + var = value; + + if (var > 0) +/* $ The following line is "optional" but is not removed due to '-nsob'. */ + + var--; + + return var; + +} + + +int +function_with_2_blank_lines(void) +{ + + + int var; + + + var = value; + + + if (var > 0) +/* $ The following 2 lines are "optional" and are not removed due to '-nsob'. */ + + + var--; + + + return var; + + +} +#indent end + +#indent run -nsob +void function_declaration(void); + + +int +function_with_0_blank_lines(void) +{ + int var; + var = value; + if (var > 0) + var--; + return var; +} + +int +function_with_1_blank_line(void) +{ + + int var; + + var = value; + + if (var > 0) + + var--; + + return var; + +} + + +int +function_with_2_blank_lines(void) +{ + + + int var; + + + var = value; + + + if (var > 0) + + + var--; + + + return var; + + +} +#indent end Index: src/tests/usr.bin/indent/opt_ut.c diff -u /dev/null src/tests/usr.bin/indent/opt_ut.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_ut.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,52 @@ +/* $NetBSD: opt_ut.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +int variable; + +void function_declaration(void); + +void +function_definition(void) +{ + int local_variable; +} +#indent end + +#indent run -ut +int variable; + +void function_declaration(void); + +void +function_definition(void) +{ + int local_variable; +} +#indent end + +#indent input +int var; + +void +function(int arg) +{ + if (arg > 0) + function( + arg - 1 + ); +} +#indent end + +#indent run -nut +int var; + +void +function(int arg) +{ + if (arg > 0) + function( + arg - 1 + ); +} +#indent end Index: src/tests/usr.bin/indent/opt_v.c diff -u /dev/null src/tests/usr.bin/indent/opt_v.c:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/opt_v.c Sat Oct 16 03:20:13 2021 @@ -0,0 +1,56 @@ +/* $NetBSD: opt_v.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */ +/* $FreeBSD$ */ + +#indent input +/* + * A long comment. + */ +void +example(void) +{ + printf("A very long message template with %d arguments: %s, %s, %s", 3, "first", "second", "third"); +} + +/* $ This comment is neither counted nor formatted. */ +#define macro1 /* prefix */ suffix + +/* $ This comment is formatted and counted. */ +#define macro2 prefix /* suffix */ +#indent end + +#indent run -v +/* + * A long comment. + */ +void +example(void) +{ + printf("A very long message template with %d arguments: %s, %s, %s", 3, "first", "second", "third"); +} + +#define macro1 /* prefix */ suffix + +#define macro2 prefix /* suffix */ +There were 10 output lines and 2 comments +(Lines with comments)/(Lines with code): 0.571 +#indent end + +#indent input +void +example(void) +{ + int sum1 = 1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21; + int sum2 = (1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+21); +} +#indent end + +#indent run -nv +void +example(void) +{ +/* $ XXX: The following lines are too long and should thus be broken. */ +/* $ XXX: If they are broken, -nv does NOT output 'Line broken'. */ + int sum1 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21; + int sum2 = (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21); +} +#indent end Index: src/tests/usr.bin/indent/t_options.sh diff -u /dev/null src/tests/usr.bin/indent/t_options.sh:1.1 --- /dev/null Sat Oct 16 03:20:13 2021 +++ src/tests/usr.bin/indent/t_options.sh Sat Oct 16 03:20:13 2021 @@ -0,0 +1,134 @@ +#! /bin/sh +# $NetBSD: t_options.sh,v 1.1 2021/10/16 03:20:13 rillig Exp $ +# +# Copyright (c) 2021 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ + +# Tests for indent that focus on comparing the effects of the various command +# line options. +# +# The test files contain the input to be formatted, the formatting options +# and the output, all as close together as possible. The test files use the +# following directives: +# +# #indent input [description] +# Specifies the input to be formatted. +# #indent run [options] +# Runs indent on the input, using the given options. +# #indent end [description] +# Finishes an 'input' or 'run' section. +# +# All text between these directives is not passed to indent. + +srcdir=$(atf_get_srcdir) +indent=$(atf_config_get usr.bin.indent.test_indent /usr/bin/indent) + +# shellcheck disable=SC2016 +check_awk=' +function die(msg) +{ + print msg > "/dev/stderr" + exit(1) +} + +# Skip comments starting with dollar; they are used for marking bugs and +# adding other remarks directly in the input or output sections. +/^[[:space:]]*\/[*][[:space:]]*[$].*[*]\/$/ || + /^[[:space:]]*\/\/[[:space:]]*[$]/ { + next +} + +/^#/ && $1 == "#indent" { + print $0 + if ($2 == "input") { + if (unused != 0) + die(FILENAME ":" unused ": input is not used") + mode = "input" + in_lines_len = 0 + unused = NR + } else if ($2 == "run") { + mode = "run" + cmd = ENVIRON["INDENT"] + for (i = 3; i <= NF; i++) + cmd = cmd " " $i + for (i = 1; i <= in_lines_len; i++) + print in_lines[i] | cmd + close(cmd) + unused = 0 + } else if ($2 == "run-identity") { + cmd = ENVIRON["INDENT"] + for (i = 3; i <= NF; i++) + cmd = cmd " " $i + for (i = 1; i <= in_lines_len; i++) { + print in_lines[i] | cmd + print in_lines[i] > "expected.out" + } + close(cmd) + unused = 0 + } else if ($2 == "end") { + mode = "" + } else { + die(FILENAME ":" NR ": error: invalid line \"" $0 "\"") + } + print $0 > "expected.out" + next +} + +mode == "input" { + in_lines[++in_lines_len] = $0 +} + +mode == "run" { + print $0 > "expected.out" +} + +END { + if (mode != "") + die(FILENAME ":" NR ": still in mode \"" mode "\"") + if (unused != 0) + die(FILENAME ":" unused ": input is not used") +} +' + +check() +{ + printf '%s\n' "$check_awk" > check.awk + + atf_check -o "file:expected.out" \ + env INDENT="$indent" awk -f check.awk "$srcdir/$1.c" +} + +atf_init_test_cases() +{ + for fname in "$srcdir"/opt_*.c; do + test_name=${fname##*/} + test_name=${test_name%.c} + + atf_test_case "$test_name" + eval "${test_name}_body() { check '$test_name'; }" + atf_add_test_case "$test_name" + done +}