Add a test that uses print and print_when.