custom.c does not use the test.h and debug.h definitions and presumably has a good reason not to. But this resulted in the printf-format compiler attribute getting lost. So copy it from debug.h to allow proper checks of the ok_() format string.
Also fix said format strings.