By now, an update/move to `pyreadline3` is sensible (as already in
the principal branch). Extension with `pytest` offers an optional
test on site.
In Linux Debian 13/trixie (virtual environment of Python 3.12.4 and
pytest 8.3.3), out of 540 tests all 540 pass, and 4 are tagged
with a warning. Pylint (3.3.1)/astroid (3.3.5) indicate a couple of
possible improvements (r strings, etc.) and hence rate
test_appendfilename.py with 6.21/10 -- but does not report a syntax
error.
Signed-off-by: Norwid Behrnd <nbehrnd@yahoo.com>
Module `pyreadline3`, a fork of `pyreadline` no longer actively
maintained on PyPI replaces its predecessor. This equally aims
to account for an reported problem using the utility in Windows.[1]
[1] https://github.com/novoid/appendfilename/issues/18
Signed-off-by: Norwid Behrnd <nbehrnd@yahoo.com>
Ahead of the addition of checks about three stamp pattern issued
by date2name, the checker about appendfilename's the option
--smart-prepent is reorganized to be more compact/easier to be
read. For now, this outweights each filename being checked twice.
This extends the pattern tested to consider all five stamp formats
issued by date2name when passing appendfilename either in default,
or prepend mode. It doesn't yet the --smart-prepend mode as third
option.
Checks of appendfilename --smart-prepend now consider date2name'
default time stamp (YYYY-MM-DD), the by date2name --withtime
(YYYY-MM-DDTHH.MM.SS), or absence of such by pattern recognition
with regular expressions.
For programmatic testing of appendfilename, a test generator
is written. This tangles a Makefile, a pytest.ini and the
test script. Despite the incomplete coverage of this approach,
an inconsistency in appendfilename's interaction on files with
the simple YYYY-MM-DD timestamp (date2name) is spot.