• exec/tests/atcodes/byte_formats.js duration_formats.js freespace.js mo

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Nov 14 13:59:52 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/bb51fb51bac506ef6ed58ced
    Added Files:
    exec/tests/atcodes/byte_formats.js duration_formats.js freespace.js modifiers.js skipif
    Modified Files:
    exec/tests/test.js
    Log Message:
    Add @-code tests, runnable from a terminal session

    @-codes are only expanded by the terminal server, so these tests need the
    bbs object and can't run under jsexec. exec/tests/atcodes/ covers:
    - display modifiers: case, alignment, width, truncation, zero-padding and
    thousands separators
    - byte-count formats (:B, :K, :M, :G, :V)
    - duration formats (:F, :!, :A, :T, :B, :V, :C, :W, :D, :E, :S, :M)
    - @FREESPACE@ and its K/M/G/T variants, checked against the free space in
    bytes

    The tests set the current user's note, credits and banked minutes to
    known values and restore them before returning.

    test.js now takes an optional sub-directory argument, so a sysop can run
    just these tests from a terminal session:

    ;EXEC ?<exec dir>/tests/test.js atcodes

    Under jsexec (and so in CI) the directory's skipif skips them.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net