Currently q file tests are executed line-by-line. This could lead to problems, e.g. when a q file has some long running queries and the last line contains a syntax error. In this case everything before the wrong line will be executed first, which could take a lot of time and only then will the test fail due to the syntax error.
I propose a simple syntax checker that will check the q file for errors before executing any statements. This check can will be turned off by default and can be enabled with the following option: