The NetBSD Project

CVS log for src/tests/usr.bin/indent/Attic/comment-line-end.0.stdout

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10, Mon Oct 18 19:36:30 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED

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.9 / (download) - annotate - [select for diffs], Fri Oct 8 18:29:36 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.8: +7 -12 lines
Diff to previous 1.8 (colored)

indent: fix formatting of C99 comments

The first attempt at formatting C99 comments was conceptually wrong. It
accessed the next token in dump_line, even though that function should
only ever look at the buffers for the label, the code and the current
comment. (Understanding that part of the code was difficult at that time
due to the sheer number of global variables.) The complicated and
ever-growing condition for whether to output the token was a hack and in
retrospect doesn't make sense at all, that's why it only came close to
the intended effect.

Some unintended side effects were that the C99 comments had an
additional space in front of them, and that in some cases an empty line
followed the comment, and that the comments were not aligned.

Previously, the newline that terminates the C99 comment was included in
the comment. Separating the newline from the comment fixed all these
unintended side effects. The only downside is that the multi-line
statement is not indented, but that should be easy to fix.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 30 22:45:34 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.7: +12 -1 lines
Diff to previous 1.7 (colored)

tests/indent: add more tests with ')(', found bug in '//'

Revision 1.7 / (download) - annotate - [select for diffs], Fri Sep 24 16:29:31 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

indent: fix token duplication after C99 comment

The code that keeps blank lines after C99 comments still looks wrong,
but at least it's better than before.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Sep 24 06:30:02 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.5: +10 -1 lines
Diff to previous 1.5 (colored)

tests/indent: demonstrate token repetition after line-end comment

Revision 1.5 / (download) - annotate - [select for diffs], Fri Mar 12 18:28:07 2021 UTC (3 years, 1 month 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.4: +4 -1 lines
Diff to previous 1.4 (colored)

tests/indent: demonstrate stray empty line at end-of-file

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 7 22:11:01 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.3: +15 -17 lines
Diff to previous 1.3 (colored)

indent: fix handling of '//' end-of-line comments

Revision 1.3 / (download) - annotate - [select for diffs], Sun Mar 7 08:57:38 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.2: +5 -10 lines
Diff to previous 1.2 (colored)

tests/indent: allow for comments in either the input or output files

Revision 1.2 / (download) - annotate - [select for diffs], Sat Mar 6 15:02:38 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.1: +22 -3 lines
Diff to previous 1.1 (colored)

tests/indent: extend test for '//' comments with more examples

Revision 1.1 / (download) - annotate - [select for diffs], Sun Feb 21 21:26:26 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN

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.

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>