mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
3e40566bb0
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.
7 lines
109 B
C
7 lines
109 B
C
/*
|
|
* cgtest.c: stub file to compile cmdgen.c in self-test mode
|
|
*/
|
|
|
|
#define TEST_CMDGEN
|
|
#include "cmdgen.c"
|