The NetBSD Project

CVS log for src/tests/usr.bin/indent/t_errors.sh

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Fri Apr 22 21:21:20 2022 UTC (9 months ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.23: +1 -3 lines
Diff to previous 1.23 (colored)

indent: remove FreeBSD IDs

Most of the IDs were empty anyway.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Feb 13 11:07:48 2022 UTC (11 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.22: +49 -1 lines
Diff to previous 1.22 (colored)

tests/indent: demonstrate the poor handling of compound literals

Revision 1.22 / (download) - annotate - [select for diffs], Thu Nov 25 21:48:23 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.21: +4 -5 lines
Diff to previous 1.21 (colored)

indent: make error message for missing command line arguments clearer

Revision 1.21 / (download) - annotate - [select for diffs], Thu Nov 25 21:45:28 2021 UTC (14 months ago) by rillig
Branch: MAIN
Changes since 1.20: +15 -17 lines
Diff to previous 1.20 (colored)

tests/indent: use escape sequence for newline characters

No functional change.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Nov 7 18:09:56 2021 UTC (14 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +7 -10 lines
Diff to previous 1.19 (colored)

indent: parse special options strictly

Revision 1.19 / (download) - annotate - [select for diffs], Sun Nov 7 15:54:00 2021 UTC (14 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.18: +31 -1 lines
Diff to previous 1.18 (colored)

tests/indent: test lenient option parsing

Revision 1.18 / (download) - annotate - [select for diffs], Sun Nov 7 10:42:58 2021 UTC (14 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +16 -4 lines
Diff to previous 1.17 (colored)

indent: remove redundant assignment

At that point, ps.next_col_1 is already false.

No functional change.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Oct 30 16:57:18 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +17 -2 lines
Diff to previous 1.16 (colored)

indent: fix assertion in fits_in_one_line

Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 30 16:43:23 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +21 -1 lines
Diff to previous 1.15 (colored)

tests/indent: demonstrate assertion failure in fits_in_one_line

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 30 15:26:58 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.14: +5 -3 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Sat Oct 30 13:30:26 2021 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.13: +12 -2 lines
Diff to previous 1.13 (colored)

indent: fix assertion failure in search_stmt_comment

I have no idea why the code was written in such a convoluted way before.
By removing all the code that didn't make sense, everything just works
as expected, and the existing tests all pass, especially those in
token_comment.c that mention search_stmt_comment.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Oct 29 20:05:58 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

indent: replace segmentation fault with assertion

Revision 1.12 / (download) - annotate - [select for diffs], Fri Oct 29 19:39:32 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.11: +10 -1 lines
Diff to previous 1.11 (colored)

tests/indent: demonstrate segmentation fault in search_stmt_comment

Revision 1.11 / (download) - annotate - [select for diffs], Fri Oct 29 16:54:51 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.10: +6 -6 lines
Diff to previous 1.10 (colored)

indent: spell 'parentheses' properly in messages and comments

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 29 16:49:46 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.9: +22 -1 lines
Diff to previous 1.9 (colored)

tests/indent: provoke the third occurrence of 'unbalanced parens'

Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 29 16:43:05 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.8: +45 -1 lines
Diff to previous 1.8 (colored)

tests/indent: provoke error messages for unbalanced parentheses

Revision 1.8 / (download) - annotate - [select for diffs], Thu Oct 28 21:35:57 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.7: +2 -3 lines
Diff to previous 1.7 (colored)

indent: fix error message for buffer overflow during option parsing

At this early time, the input file has not been opened yet, so there is
no reason to output either the input file name or the line number.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 28 21:32:49 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +15 -15 lines
Diff to previous 1.6 (colored)

indent: make error messages for option parsing more precise

Revision 1.6 / (download) - annotate - [select for diffs], Thu Oct 28 21:02:05 2021 UTC (14 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +10 -1 lines
Diff to previous 1.5 (colored)

indent: parse option '-cli' strictly

Revision 1.5 / (download) - annotate - [select for diffs], Sun Oct 24 17:19:49 2021 UTC (15 months ago) by rillig
Branch: MAIN
Changes since 1.4: +13 -13 lines
Diff to previous 1.4 (colored)

indent: clean up format of warnings and errors

Previously, warnings and errors had the form of C block comments. Before
NetBSD io.c 1.20 from 2019-10-19, this format made sense because the
diagnostics could end up in the same output stream as the formatted
output.

Since NetBSD io.c 1.20 from 2019-10-19, all diagnostics are redirected
to stderr. This change was not mentioned in the commit message back
then, it makes sense nevertheless. Since stdout and stderr now are
properly separated, there is no need anymore to keep the weird format
for warnings and errors. Switch to the standard 'error: file:line'
format.

Move the function 'diag' to indent.c to have access to the name of the
current input file.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Oct 17 18:13:00 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.3: +14 -5 lines
Diff to previous 1.3 (colored)

indent: parse int command line options strictly

On i386 and other platforms where LONG_MAX == INT_MAX, the test
t_errors/option_tabsize_very_large failed since the behavior on integer
overflow differs between ILP32 and LP64 platforms. Noticed by gson@.

Avoid this unintended difference by adding reasonable limits for each of
the integer options and by replacing atoi with strtol.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Oct 14 18:55:41 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.2: +221 -1 lines
Diff to previous 1.2 (colored)

tests/indent: cover more error cases and inline indentation

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

tests/indent: provide full line coverage for argument handling

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 13 23:33:52 2021 UTC (15 months, 1 week ago) by rillig
Branch: MAIN

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.

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>