Αυτό μπορεί να γίνει γράφοντας ειδικό κώδικα για να ελέγχει κάθε
τμήμα.
Παράδειγμα:
...
main()
{
process('/');
process('*');
if (state == COMMENT)
printf("Test 1 OK");
else
printf("Test 1 FAIL: Comment enter error");
state = COMMENT;
process('*');
process(' ');
process('/');
if (state == COMMENT)
printf("Test 2 OK");
else
printf("Test 2 FAIL: Comment end error");
state = COMMENT;
process('*');
process('/');
if (state != COMMENT)
printf("Test 3 OK");
else
printf("Test 3 FAIL: Comment end error");
printf("Test 4: Bellow you should see:\n[\t\t\t]\n");
indent_level = 3;
putchar('[');
indent();
printf("]\n");
}