test: Fix min() test

Also add an automated regression test to the test suite to check that
all tests defined in Main run correctly.