Re: [hackers] [sbase][PATCH] Test framework created. See tests/README for details. Individual test cases can be run from tests dir using command line. Entire test suite can be run using: make && make tests

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.net>
Date: Wed, 5 Nov 2025 18:49:31 +0100

Hi,

On Wed, Jun 04, 2025 at 11:30:32AM +1000, Xan Phung wrote:
> ---
> .gitignore | 2 +
> Makefile | 11 ++--
> tests/README | 109 +++++++++++++++++++++++++++++++++++++++
> tests/echo-n.sh | 10 ++++
> tests/echo-n.sh.expected | 1 +
> 5 files changed, 130 insertions(+), 3 deletions(-)
> create mode 100644 tests/README
> create mode 100755 tests/echo-n.sh
> create mode 100644 tests/echo-n.sh.expected

Good point, this is something that we discussed many times but we
didn't do before just because we were very lazy. I think it is a
good moment to begin with the tests.

Saying that, I think the test no-framework should be much more
simple, and encapsulated in the test directory. Every shell script
test should be independent, not sharing magic environment variables
and being responsible of how to test, instead of relaying in having
an expected file. Having the expected file works in some cases, but
in our case where in many cases we have to deal with signals it
does not behave very well.

Also, having just a set of shell scripts and using their exit status
remove the need of any documentation. Just try to get a successful
shell script execution.

My proposal is this:

8< -----
Received on Wed Nov 05 2025 - 18:49:31 CET

This archive was generated by hypermail 2.3.0 : Wed Nov 05 2025 - 19:00:38 CET