Add more plan tests and a test number 0 test
Fix an issue when testnum == 0