The NetBSD Project

CVS log for src/tests/usr.bin/indent/Makefile

[BACK] Up to [cvs.NetBSD.org] / src / tests / usr.bin / indent

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.45 / (download) - annotate - [select for diffs], Sun Apr 24 10:36:37 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.44: +3 -28 lines
Diff to previous 1.44 (colored)

tests/indent: migrate token tests to other tests

In indent.h 1.49 from 2021-10-25, the enumeration token_type was split
into lexer_symbol and parser_symbol to more clearly express that these
tokens fall into completely different classes of usage patterns.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Apr 24 09:04:12 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)

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.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Apr 24 08:48:17 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.42: +1 -3 lines
Diff to previous 1.42 (colored)

tests/indent: migrate tests for parentheses, brackets, braces

Revision 1.42 / (download) - annotate - [select for diffs], Sat Apr 23 09:59:14 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.41: +1 -3 lines
Diff to previous 1.41 (colored)

tests/indent: migrate tests for the tokens '{' and '.'

Revision 1.41 / (download) - annotate - [select for diffs], Sat Apr 23 09:01:03 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.40: +1 -4 lines
Diff to previous 1.40 (colored)

tests/indent: migrate a few token tests to psym tests

Revision 1.40 / (download) - annotate - [select for diffs], Fri Apr 22 21:21:20 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (colored)

indent: remove FreeBSD IDs

Most of the IDs were empty anyway.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Nov 28 16:20:13 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.38: +1 -2 lines
Diff to previous 1.38 (colored)

tests/indent: migrate token_question to lsym_question and extend it

Revision 1.38 / (download) - annotate - [select for diffs], Sun Nov 28 16:05:59 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.37: +1 -2 lines
Diff to previous 1.37 (colored)

tests/indent: migrate test token_case_label to lsym_case_label

Revision 1.37 / (download) - annotate - [select for diffs], Sun Nov 28 15:26:22 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.36: +1 -2 lines
Diff to previous 1.36 (colored)

tests/indent: migrate token_comma to lsym_comma

The section on initializer values is new.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Nov 28 14:49:28 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

tests/indent: move test for ':' to lsym_token.c

Revision 1.35 / (download) - annotate - [select for diffs], Sun Nov 28 14:29:03 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.34: +1 -2 lines
Diff to previous 1.34 (colored)

indent: treat L"string" as a single token

There is never whitespace between the 'L' and the string literal or the
character constant. There might be a backslash-newline between them, but
that case was not handled before either.

No functional change.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Nov 18 21:19:19 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.33: +53 -3 lines
Diff to previous 1.33 (colored)

tests/indent: add skeletons for testing tokens and parser symbols

The constants that were previously defined in indent_codes.h were a wild
mixture of tokens from the lexer and symbols on the parser stack.  They
were split into separate types starting at indent.h 1.49 from 2021-10-25
and finishing at 1.73 from 2021-10-31.

To match the tests with the new token names, the old tests need to be
migrated to the newly added tests.  This will take some time so first
add the skeletons and migrate them in smaller steps, cleaning them up
and extending them on the way.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 23 21:45:14 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.32: +1 -16 lines
Diff to previous 1.32 (colored)

tests/indent: migrate remaining tests from t_indent to t_options

The test types_from_file was a subset of opt_U and thus has been
removed.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Oct 23 20:30:23 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.31: +2 -4 lines
Diff to previous 1.31 (colored)

tests/indent: migrate test for '-bap -sob' to t_options

Revision 1.31 / (download) - annotate - [select for diffs], Sat Oct 23 20:23:27 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.30: +2 -4 lines
Diff to previous 1.30 (colored)

tests/indent: migrate test for '--version' to t_options

Revision 1.30 / (download) - annotate - [select for diffs], Sat Oct 23 20:17:08 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

tests/indent: migrate test for offsetof to t_options

Revision 1.29 / (download) - annotate - [select for diffs], Sat Oct 23 20:07:03 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.28: +1 -3 lines
Diff to previous 1.28 (colored)

tests/indent: remove redundant test list_head

The test cases are already in fmt_decl.c, in old_style_definition and
LIST_HEAD.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Oct 23 20:01:14 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

tests/indent: migrate f_decls to using t_options, add more tests

Revision 1.27 / (download) - annotate - [select for diffs], Fri Oct 22 20:54:36 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.26: +18 -55 lines
Diff to previous 1.26 (colored)

tests/indent: migrate integer options tests to t_options

Revision 1.26 / (download) - annotate - [select for diffs], Fri Oct 22 19:46:41 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.25: +1 -11 lines
Diff to previous 1.25 (colored)

tests/indent: migrate tests for parentheses, struct, #if, wide char

Revision 1.25 / (download) - annotate - [select for diffs], Fri Oct 22 19:27:53 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.24: +5 -18 lines
Diff to previous 1.24 (colored)

tests/indent: migrate a few more tests to t_options

Revision 1.24 / (download) - annotate - [select for diffs], Tue Oct 19 20:20:24 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

tests/indent: add test for INDENT OFF/ON comments

Just to prevent unintended side effects when fixing bugs in this area.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 19 19:59:05 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.22: +12 -19 lines
Diff to previous 1.22 (colored)

tests/indent: make add-test generate flexible tests

They need fewer source files and are more versatile.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 18 23:01:10 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.21: +1 -7 lines
Diff to previous 1.21 (colored)

tests/indent: remove redundant tests for '-ncs' and '-pcs'

These tests are already covered by opt_cs.c and opt_pcs.c.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 18 22:46:33 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.20: +2 -4 lines
Diff to previous 1.20 (colored)

tests/indent: condense test for indentation level, add missing files

Revision 1.20 / (download) - annotate - [select for diffs], Mon Oct 18 22:30:34 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +37 -109 lines
Diff to previous 1.19 (colored)

tests/indent: condense the token tests

This reduces the number of files in the test directory. It also allows
the tests to be read from top to bottom, looking at only a single file.

Since t_options.awk complains about files that don't have any test case
at all, add some test for each token kind. Most of the tests had
previously been effectively empty.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Oct 18 20:18:00 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.18: +3 -4 lines
Diff to previous 1.18 (colored)

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.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Oct 18 19:36:30 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +2 -9 lines
Diff to previous 1.17 (colored)

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.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Oct 18 18:10:20 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +3 -12 lines
Diff to previous 1.16 (colored)

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.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 16 03:20:12 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +27 -151 lines
Diff to previous 1.15 (colored)

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.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Oct 14 17:42:13 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

tests/indent: provide full line coverage for argument handling

Revision 1.14 / (download) - annotate - [select for diffs], Wed Oct 13 23:33:52 2021 UTC (15 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

indent: check command line options stricter

Previously, bool options were allowed to have trailing garbage. For
example, the option '-bacc' could be spelled '-bacchus' as well.

Check that the exact option name is given in the command line, to
prevent typos in the configuration files and to reduce surprises just in
case a future option is a prefix of an existing option, or vice versa.

Add a new test program for error handling. Most of these tests are so
simple that it would be overkill to create 3 files for each test.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Oct 7 18:07:25 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored)

tests/indent: test parsing of command line options in profile file

Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 5 17:09:45 2021 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.11: +4 -1 lines
Diff to previous 1.11 (colored)

tests/indent: demonstrate off-by-one error in edge case

Revision 1.11 / (download) - annotate - [select for diffs], Sat Sep 25 13:04:55 2021 UTC (16 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

tests/indent: test deeply nested struct declarations

Revision 1.10 / (download) - annotate - [select for diffs], Sat Sep 25 12:20:44 2021 UTC (16 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.9: +4 -1 lines
Diff to previous 1.9 (colored)

tests/indent: test edge cases for the tokenizer

Revision 1.9 / (download) - annotate - [select for diffs], Sat Sep 25 09:46:29 2021 UTC (16 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.8: +8 -2 lines
Diff to previous 1.8 (colored)

tests/indent: test lexing of character constants and string literals

Revision 1.8 / (download) - annotate - [select for diffs], Fri Mar 12 00:13:06 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.7: +115 -1 lines
Diff to previous 1.7 (colored)

tests/indent: add test templates for testing specific parser symbols

The basic idea of indent is to split the input into tokens and then
reassemble them, reformatting them on the way.  These tokens determine
how the output is formatted, therefore add tests for each of the
terminal tokens and nonterminal parser symbols, to cover more common
cases, and edge cases as well.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Mar 9 20:43:20 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +63 -1 lines
Diff to previous 1.6 (colored)

tests/indent: demonstrate strange alignment for global variables

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 8 22:13:05 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +4 -1 lines
Diff to previous 1.5 (colored)

tests/indent: demonstrate wrong removed empty line before '//'

Revision 1.5 / (download) - annotate - [select for diffs], Mon Mar 8 20:55:34 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

tests/indent: demonstrate another bug in nested blocks

Revision 1.4 / (download) - annotate - [select for diffs], Mon Mar 8 20:12:04 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +4 -1 lines
Diff to previous 1.3 (colored)

tests/indent: add test for output line counting

Revision 1.3 / (download) - annotate - [select for diffs], Sat Mar 6 17:56:33 2021 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.2: +209 -1 lines
Diff to previous 1.2 (colored)

tests/indent: add templates for options tests

Given that indent "has even more switches than ls(1)", there are far too
few tests.  To make it easier to add meaningful tests for each of the
options, add the templates for the tests right now, ready to be filled
in.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Feb 21 21:26:26 2021 UTC (23 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

indent: add test demonstrating that indent cannot handle C99

indent cannot handle line-end comments.

The indent test suite requires each test file to have both a NetBSD and
a FreeBSD RCS ID.  If the FreeBSD RCS ID is missing, the test will
silently pass since in that case, an empty file is compared with an
empty file.  See the /start/,/end/ operator in t_indent.sh.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Mon Jun 10 22:10:12 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.1.2.1: +54 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD

Revision 1.1.2.1, Thu Apr 4 15:27:35 2019 UTC (3 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.1: +0 -54 lines
FILE REMOVED

file Makefile was added on branch phil-wifi on 2019-06-10 22:10:12 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Thu Apr 4 15:27:35 2019 UTC (3 years, 9 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Branch point for: phil-wifi

Upgrade indent(1)

Merge all the changes from the recent FreeBSD HEAD snapshot
into our local copy.

FreeBSD actively maintains this program in their sources and their
repository contains over 100 commits with changes.

Keep the delta between the FreeBSD and NetBSD versions to absolute
minimum, mostly RCS Id and compatiblity fixes.

Major chages in this import:

 - Added an option -ldi<N> to control indentation of local variable names.
 - Added option -P for loading user-provided files as profiles
 - Added -tsn for setting tabsize
 - Rename -nsac/-sac ("space after cast") to -ncs/-cs
 - Added option -fbs Enables (disables) splitting the function declaration and opening brace across two lines.
 - Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
 - Group global option variables into an options structure
 - Use bsearch() for looking up type keywords.
 - Don't produce unneeded space character in function declarators
 - Don't unnecessarily add a blank before a comment ends.
 - Don't ignore newlines after comments that follow braces.

Merge the FreeBSD intend(1) tests with our ATF framework.
All tests pass.

Upgrade prepared by Manikishan Ghantasala.
Final polishing by myself.

Part II, checkin new files.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>