When I developed my own coding font (Luculent), the compact sample that I ultimately came up with was:
// The five boxing wizards jump
#include <stdio.h> // <= quickly.
int main(int argc, char **argv) {
float il1[]={1-2/3.4,5+6==7/8};
int OxFaced=0xBAD||"[{(CQUINE";
unsigned O0,l1,Z2,S5,G6,B8__XY;
printf("@$Hamburgefo%c`",'\n');
return ~7&8^9?0:l1|!"j->k+=*w";
}
It has a pangram, lots of confusable pairs of characters adjacent to each other, opening brackets next to each other and near a pipe character, quotes and commas next to each other, lining operators (i.e., ->, += and <=), and every normal punctuation character on a US keyboard. It also happens to be a valid, though useless, C or C++ program.
This is a big one for me. None of the sample text had a capital O to compare to 0.