Improvement to testing
There are a lot of tests that run ecm looking for an explicit factors, but the code only checks the exit code. I think that testing would be improved if after checkcode
, checkfound <EXPECTED FACTOR>
was added to some of the tests. I'd be happy to update all the testing if someone can figure out how to record stdout.
It could be done with tee
which is part of Ubuntu coreutils [1] but possible not every platforms?
Alternatively a bash function could probably replicate this behavior with
test() {
$ECM $* > $ECM_OUTPUT_TEMP;
ret=$?;
cat $ECM_OUTPUT_TEMP;
return $ret
}
or some other clever solution.