Up to [cvs.NetBSD.org] / src / tests / usr.bin / indent
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.31, Sun Apr 24 10:36:37 2022 UTC (9 months ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.30: +1 -1
lines
FILE REMOVED
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.30 / (download) - annotate - [select for diffs], Sun Apr 24 09:04:12 2022 UTC (9 months ago) by rillig
Branch: MAIN
Changes since 1.29: +150 -150
lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Sun Apr 24 08:52:44 2022 UTC (9 months ago) by rillig
Branch: MAIN
Changes since 1.28: +5 -1
lines
Diff to previous 1.28 (colored)
tests/indent: normalize amount of empty lines between test cases
Revision 1.28 / (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.27: +1 -2
lines
Diff to previous 1.27 (colored)
indent: remove FreeBSD IDs Most of the IDs were empty anyway.
Revision 1.27 / (download) - annotate - [select for diffs], Sat Nov 27 18:37:17 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.26: +2 -2
lines
Diff to previous 1.26 (colored)
indent: rename dump functions to output No functional change.
Revision 1.26 / (download) - annotate - [select for diffs], Thu Nov 25 20:44:10 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.25: +9 -5
lines
Diff to previous 1.25 (colored)
indent: fix accidentally joined and broken comments (since 2019-04-04) The fixed version is not perfect as it gets the indentation of the last line of the first comment wrong, but at least indent doesn't generate malformed output anymore.
Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 25 20:14:00 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.24: +35 -1
lines
Diff to previous 1.24 (colored)
tests/indent: demonstrate bugs in comment processing
Revision 1.24 / (download) - annotate - [select for diffs], Sat Nov 20 16:54:17 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.23: +43 -51
lines
Diff to previous 1.23 (colored)
tests/indent: clean up and extend tests
Revision 1.23 / (download) - annotate - [select for diffs], Sat Nov 20 11:13:18 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.22: +16 -5
lines
Diff to previous 1.22 (colored)
tests/indent: normalize empty lines in tests
Revision 1.22 / (download) - annotate - [select for diffs], Sun Nov 7 12:26:22 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.21: +26 -1
lines
Diff to previous 1.21 (colored)
tests/indent: improve code coverage for processing comments
Revision 1.21 / (download) - annotate - [select for diffs], Sun Nov 7 11:30:45 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.20: +36 -1
lines
Diff to previous 1.20 (colored)
indent: remove dead code in analyze_comment The case of an otherwise empty line is already handled further above.
Revision 1.20 / (download) - annotate - [select for diffs], Sun Nov 7 10:13:26 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +25 -1
lines
Diff to previous 1.19 (colored)
indent: make copy_comment_nowrap simpler Since a nowrap comment is copied unmodified, it need not depend on any maximum line length. No functional change.
Revision 1.19 / (download) - annotate - [select for diffs], Sun Nov 7 07:45:00 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.18: +2 -2
lines
Diff to previous 1.18 (colored)
indent: rename type_at_paren_level_0 to type_outside_parentheses For symmetry with type_in_parentheses. No functional change.
Revision 1.18 / (download) - annotate - [select for diffs], Fri Nov 5 19:33:28 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +2 -2
lines
Diff to previous 1.17 (colored)
indent: rename ps.curr_newline to next_col_1 For symmetry with ps.curr_col_1. No functional change.
Revision 1.17 / (download) - annotate - [select for diffs], Thu Nov 4 18:38:37 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +5 -8
lines
Diff to previous 1.16 (colored)
indent: fix parsing of C99 comments containing '*/'
Revision 1.16 / (download) - annotate - [select for diffs], Thu Nov 4 18:31:22 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +18 -1
lines
Diff to previous 1.15 (colored)
tests/indent: demonstrate wrong edge case in C99 comments
Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 30 22:36:07 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.14: +2 -2
lines
Diff to previous 1.14 (colored)
indent: rename prev_newline and prev_col_1 to curr These two flags describe the token that is currently processed. In process_binary_op, curr_newline can never be true since newline is not a binary operator, so remove that condition. No functional change.
Revision 1.14 / (download) - annotate - [select for diffs], Sat Oct 30 16:57:18 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.13: +36 -1
lines
Diff to previous 1.13 (colored)
indent: fix assertion in fits_in_one_line
Revision 1.13 / (download) - annotate - [select for diffs], Sat Oct 30 15:26:58 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.12: +20 -1
lines
Diff to previous 1.12 (colored)
indent: revert previous fix of assertion failure The strange code with the out of bounds memory access is needed to transform 'if (expr) /* comment */ {' to 'if (expr) { /* comment */', that is, to move the comment to the right. Add a test that prevents "repairing" this code again.
Revision 1.12 / (download) - annotate - [select for diffs], Sat Oct 30 13:06:43 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.11: +111 -22
lines
Diff to previous 1.11 (colored)
tests/indent: add more tests for the assertion in search_stmt_comment
Revision 1.11 / (download) - annotate - [select for diffs], Sat Oct 30 12:28:42 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.10: +11 -3
lines
Diff to previous 1.10 (colored)
tests/indent: test preserving the internal layout of box comments
Revision 1.10 / (download) - annotate - [select for diffs], Sat Oct 30 12:24:03 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.9: +63 -7
lines
Diff to previous 1.9 (colored)
tests/lint: explain and extend the tests for box comments These tests are in preparation of removing the magic number 4 from search_stmt_comment.
Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 29 17:50:37 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.8: +2 -2
lines
Diff to previous 1.8 (colored)
indent: use prev/curr/next to refer to the current token The word 'last' just didn't match with 'next'. No functional change.
Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 26 21:37:27 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.7: +13 -1
lines
Diff to previous 1.7 (colored)
indent: clean up process_comment There is no undefined behavior since the compared characters are always from the basic execution character set. All other cases are covered by the condition above for now_len. Fix debug logging for non-ASCII characters, previously a character was output as \xffffffc3.
Revision 1.7 / (download) - annotate - [select for diffs], Sun Oct 24 21:55:07 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.6: +16 -1
lines
Diff to previous 1.6 (colored)
tests/indent: document how empty lines in box comments are handled
Revision 1.6 / (download) - annotate - [select for diffs], Sun Oct 24 21:48:16 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.5: +37 -1
lines
Diff to previous 1.5 (colored)
tests/indent: test form feed in comments
Revision 1.5 / (download) - annotate - [select for diffs], Tue Oct 19 20:41:42 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.4: +1 -97
lines
Diff to previous 1.4 (colored)
tests/indent: move tests for indent comments The special INDENT ON and INDENT OFF comments look like ordinary comments but are handled in inbuf_read_line. Implementing this feature in the input function has several unintended side effects regarding indentation of these comments, as demonstrated by the tests.
Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 19 18:29:59 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.3: +1 -3
lines
Diff to previous 1.3 (colored)
indent: if a file ends with indent off, don't add space-newline
Revision 1.3 / (download) - annotate - [select for diffs], Tue Oct 19 18:18:23 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.2: +18 -343
lines
Diff to previous 1.2 (colored)
tests/indent: remove main code from test for token_comment I had indented to use that code for completing the list of missing tests but somehow forgot to remove it.
Revision 1.2 / (download) - annotate - [select for diffs], Mon Oct 18 22:30:34 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.1: +325 -1
lines
Diff to previous 1.1 (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.1 / (download) - annotate - [select for diffs], Mon Oct 18 19:36:30 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
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.