completion tests: make the $cur variable local to the test helper functions