The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/directive-for-break.exp

[BACK] Up to [] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 1 20:56:35 2023 UTC (8 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

tests/make: force line-based diagnostics to be listed in the tests

This way, contradictions between the intended output and the actual
output are closer together and have a better chance of being spotted.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 1 06:25:34 2023 UTC (8 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

make: error out on a .break directive with arguments

Revision 1.2 / (download) - annotate - [select for diffs], Sat Sep 3 00:50:07 2022 UTC (17 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

make: clean up handling of .break in .for loops

Move For_Break further up, as the functions in that file are sorted from
small to big.  The cast from size_t to unsigned int is required by lint.

In parse.c, move the code into a separate function to keep
ParseDirective small.  Its only job is to parse the directive and then
delegate to another function doing the actual work.

In the manual page, remove empty lines.

In the test, ensure that .break stops processing of the .for loop
immediately; anything after the .break is not processed anymore.
Replace ':=' with '=', as there is no need to evaluate '$i' early.
Check the expected value in the .mk file instead of the .exp file, to
keep the reading scope as small as possible.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 2 16:24:31 2022 UTC (17 months, 3 weeks ago) by sjg
Branch: MAIN

make: add .break to terminate .for loop early

When .break is encountered within a .for loop
it causes immediate termination.

Outside of a .for loop .break causes a parse error.

Reviewed by: christos

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 <>