- fputs("#include <ccan/tap/tap.h>\n", run);
- fputs("\n", run);
-
- fputs("int main(void)\n", run);
- fputs("{\n", run);
- fputs("\t/* This is how many tests you plan to run */\n", run);
- fputs("\tplan_tests(3);\n", run);
- fputs("\n", run);
- fputs("\t/* Simple thing we expect to succeed */\n", run);
- fputs("\tok1(some_test())\n", run);
- fputs("\t/* Same, with an explicit description of the test. */\n", run);
- fputs("\tok(some_test(), \"%s with no args should return 1\", \"some_test\")\n", run);
- fputs("\t/* How to print out messages for debugging. */\n", run);
- fputs("\tdiag(\"Address of some_test is %p\", &some_test)\n", run);
- fputs("\t/* Conditional tests must be explicitly skipped. */\n", run);
- fputs("#if HAVE_SOME_FEATURE\n", run);
- fputs("\tok1(test_some_feature())\n", run);
- fputs("#else\n", run);
- fputs("\tskip(1, \"Don\'t have SOME_FEATURE\")\n", run);
- fputs("#endif\n", run);
- fputs("\n", run);
- fputs("\t/* This exits depending on whether all tests passed */\n", run);
- fputs("\treturn exit_status();\n", run);
- fputs("}\n", run);
-
+ fprintf(run, "%s",
+ "#include <ccan/tap/tap.h>\n\n"
+ "int main(void)\n"
+ "{\n"
+ " /* This is how many tests you plan to run */\n"
+ " plan_tests(3);\n"
+ "\n"
+ " /* Simple thing we expect to succeed */\n"
+ " ok1(some_test())\n"
+ " /* Same, with an explicit description of the test. */\n"
+ " ok(some_test(), \"%s with no args should return 1\", \"some_test\")\n"
+ " /* How to print out messages for debugging. */\n"
+ " diag(\"Address of some_test is %p\", &some_test)\n"
+ " /* Conditional tests must be explicitly skipped. */\n"
+ "#if HAVE_SOME_FEATURE\n"
+ " ok1(test_some_feature())\n"
+ "#else\n"
+ " skip(1, \"Don\'t have SOME_FEATURE\")\n"
+ "#endif\n"
+ "\n"
+ " /* This exits depending on whether all tests passed */\n"
+ " return exit_status();\n"
+ "}\n");