]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
cmdgen: rescue test suite from bit rot.
authorSimon Tatham <anakin@pobox.com>
Wed, 30 Mar 2016 07:25:25 +0000 (08:25 +0100)
committerSimon Tatham <anakin@pobox.com>
Wed, 30 Mar 2016 07:34:14 +0000 (08:34 +0100)
commit3e40566bb053f8f438e220ede4a1da34cf386592
tree5a1637c96b2430c4f1dadec6b5c813c0886f6271
parent435b29da88d14be9ea66d44c6d47268c5f3c3e9e
cmdgen: rescue test suite from bit rot.

cmdgen.c has contained code for ages to build a test main() if you
compile with -DTEST_CMDGEN. But it's painful to do so manually, since
you've still got to link in all the same supporting objects, and also
nobody can have actually done that for a while because the stub test
code hasn't been kept up to date with changes in the internal APIs
(specifically prompt_t).

Now we have the ability to include our test programs in Recipe as [UT]
or [XT] so as to leave them out of 'make install', that seems like a
useful thing to do with cmdgen's test suite. So here's a Recipe change
that builds it as 'cgtest', plus fixes for compiler warnings and bit
rot. Pleasantly, the test suite still _passes_ after those are fixed.
.gitignore
Recipe
cgtest.c [new file with mode: 0644]
cmdgen.c