The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/varmod-order-numeric.mk

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.8 / (download) - annotate - [select for diffs], Tue Sep 27 19:18:45 2022 UTC (4 months ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.7: +7 -1 lines
Diff to previous 1.7 (colored)

tests/make: add tests for legacy local variables and sorting

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 9 21:09:24 2022 UTC (11 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Feb 4 23:43:10 2022 UTC (11 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +3 -4 lines
Diff to previous 1.5 (colored)

make: use fixed type for comparing numbers using the modifier ':On'

When the modifier ':On' was added on 2021-07-30, there were concerns
that pre-C99 environments would not have the type 'long long', therefore
the type was made configurable, but parsing such numbers was hard-coded
to using strtoll.

To improve compatibility with C90 environments, use 'long' and 'strtol'
in these environments.  In C99 environments, use 'long long' and
'strtoll', to account for larger file sizes.

If the flexibility of choosing yet another type for these numbers should
ever arise, it can still be implemented.  Until then, reduce the number
of possible build configurations.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 3 04:46:49 2021 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.4: +21 -7 lines
Diff to previous 1.4 (colored)

tests/make: fix test for the variable modifier ':On'

The variable modifier ':On' sorts words numerically.  If these words are
not numeric at all, they get assigned the numeric value 0.  Internally,
':On' uses qsort for sorting the words.  Since qsort is not specified to
use a stable sorting algorithm, the test data must only use words that
either are written in the same way or that are numerically different.

The test varmod-order failed this requirement by trying to numerically
sort a list of non-numeric words.  This led to different results on BSD
and Ubuntu, as could be expected.

To fix the tests, distinguish between words and numbers in the tests.
While here, clean up the tests for all variants of the variable modifier
':O'.

Found by sjg on Ubuntu.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 31 20:55:46 2021 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.3: +10 -70 lines
Diff to previous 1.3 (colored)

tests/make: split tests for the variable modifier ':O'

The tests for parse errors are now in varmod-order, which lets the other
tests focus on the desired behavior of the modifiers.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jul 30 23:28:04 2021 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.2: +11 -11 lines
Diff to previous 1.2 (colored)

make: handle parse errors in ':O' uniformly

Previously, the error handling for the variable modifier ':O' differed
depending on the exact variant and in some cases led to misleading
or missing diagnostics.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jul 30 22:16:09 2021 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.1: +87 -5 lines
Diff to previous 1.1 (colored)

make: fix typo in manual page, add more tests for the new ':On'

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jul 30 19:55:22 2021 UTC (18 months ago) by sjg
Branch: MAIN

Add :On for numeric sort

Reviewed by: christos rillig

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>