Home | History | Annotate | Download | only in indent
History log of /src/tests/usr.bin/indent/t_options.sh
RevisionDateAuthorComments
 1.11  20-May-2023  rillig tests/indent: migrate test driver from AWK to Lua

Lua reports more details when os.execute fails, which is useful when
running old versions of indent for comparison. The new test driver also
supports multiple test files in the same run.
 1.10  24-Apr-2022  rillig tests/indent: change directive from '#' to '//'

Using a '//' instead of '#' turns the directives into well-formed C
code, resulting in fewer error markers in the editor.
 1.9  22-Apr-2022  rillig indent: remove FreeBSD IDs

Most of the IDs were empty anyway.
 1.8  18-Oct-2021  rillig tests/indent: extend tests for labels, extract test driver

Having the test driver in a separate file allows to run it on its own,
as 'awk -f t_options.awk label.c'. When the test driver warns, exit 1;
this is only needed for the standalone version, when run from inside ATF
the warnings on stderr already suffice to make the test fail in the end.
 1.7  18-Oct-2021  rillig tests/indent: consolidate tests for comments

These tests have been the motivation for t_options.sh, which allows to
run indent with various command line options on the same input, without
having to create 3 files per test case.

A test file actually contains several tests, all separated by '#indent'
directives. Isolating each of these tests is simpler than having to pick
up the corresponding sections from 3 separate files. Running indent on
each small test case isolates the test cases from each other, preventing
them to influence later test cases. Exactly this had happened when
support for C99 comments was added in March 2021, which later turned
out to be done wrong.
 1.6  18-Oct-2021  rillig tests/indent: merge tests for numbers into token_ident

The previous tests 'binary' and 'float' not only test binary and
floating point numbers, making their names too specific. Move them into
a new test token_ident that covers all "identifier-like" tokens, just as
in the code.

The test cases for the option '-cs' are already covered more
systematically in opt_cs.c, so remove that test.
 1.5  18-Oct-2021  rillig tests/indent: merge duplicate input/output and output/output

No functional change.
 1.4  17-Oct-2021  rillig tests/lint: use zero-indexed array in awk test program

No functional change.
 1.3  17-Oct-2021  rillig tests/indent: remove redundant test output for -nbap
 1.2  16-Oct-2021  rillig tests/indent: remove duplicate data from options tests
 1.1  16-Oct-2021  rillig 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.

RSS XML Feed