Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/tests/bin/sh



Module Name:    src
Committed By:   kre
Date:           Tue Nov 24 13:11:15 UTC 2026

Modified Files:
        src/tests/bin/sh: t_expand.sh

Log Message:
tests/bin/sh/t_expand.sh - minor cleanups (NMFC)

These changes make several minor changes to the layout
of the source file, more than anything else.

There are 3 kinds of changes (repeated throughout)

1.  Use ' quoting rather than " quoting for the strings
    used as the value of the ATF descr variable for each
    test.  This allows $ and " to be used in those strings
    without requiring \ escaping, making them easier to read.
    Also, drop meaningless leading/trailing spaces in these
    strings, they don't use C string concat, which simply abuts
    the contents of the strings, but more like sh "$*" which
    puts spaces between the strings when joined into one.

2.  Consistently write multi-line sh function definitions as
        func_name()
        {
    rather than
        func_name() {
    which makes it much easier to find where each new func starts.
    It also improves internal consistency - previously there was
    a mixture of styles, some funcs one way, others the other.

3.  Add annotations which allow the (newly added) script for
    updating the sub-test numbers (in the test cases that are written
    in that manner, just some of them) so manual editing to correct
    the source indications of the sub-test numbers is no longer required.
    The sub-test numbers are reported in failure messages when a sub-test
    is not working as intended, so being able to easily match the reported
    number with the actual sub-test code, among (sometimes) hundreds of very
    similar ones, is needed, to be able to work with the correct code to
    find the source of the problem.   The script was also run on this file
    which resulted in correcting one or two minor numbering errors and
    discovering....

That much would have resulted in a NFC status for this change,
but while doing all that, a couple of cases of duplicated sub-tests
were detected (the exact same thing included twice) - the unnecessary
copies have been deleted, so instead of NFC, we just have
No Meaningful Functional Change (NMFC) for this update.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index