Permalink
Browse files

Tests: Add function to print test results

  • Loading branch information...
sanssecours committed Oct 9, 2017
1 parent c0e8d93 commit 0adfef6d19447b39e383017449be97c3ce32db40
Showing with 59 additions and 54 deletions.
  1. +1 −1 src/plugins/augeas/testmod_augeas.c
  2. +1 −1 src/plugins/base64/testmod_base64.c
  3. +1 −1 src/plugins/blockresolver/testmod_blockresolver.c
  4. +1 −1 src/plugins/boolean/testmod_boolean.c
  5. +1 −1 src/plugins/cachefilter/testmod_cachefilter.c
  6. +1 −1 src/plugins/camel/testmod_camel.c
  7. +1 −1 src/plugins/ccode/testmod_ccode.c
  8. +1 −1 src/plugins/conditionals/testmod_conditionals.c
  9. +1 −1 src/plugins/crypto/testmod_crypto_botan.c
  10. +1 −1 src/plugins/crypto/testmod_crypto_gcrypt.c
  11. +1 −1 src/plugins/crypto/testmod_crypto_openssl.c
  12. +1 −1 src/plugins/csvstorage/testmod_csvstorage.c
  13. +1 −1 src/plugins/date/testmod_date.c
  14. +1 −1 src/plugins/dump/testmod_dump.c
  15. +1 −1 src/plugins/enum/testmod_enum.c
  16. +1 −1 src/plugins/fcrypt/testmod_fcrypt.c
  17. +1 −1 src/plugins/file/testmod_file.c
  18. +1 −1 src/plugins/filecheck/testmod_filecheck.c
  19. +1 −1 src/plugins/fstab/testmod_fstab.c
  20. +1 −1 src/plugins/glob/testmod_glob.c
  21. +2 −2 src/plugins/haskell/testmod_haskell.c
  22. +1 −1 src/plugins/hexcode/testmod_hexcode.c
  23. +1 −1 src/plugins/hosts/testmod_hosts.c
  24. +1 −1 src/plugins/iconv/testmod_iconv.c
  25. +1 −1 src/plugins/ini/testmod_ini.c
  26. +1 −1 src/plugins/iterate/testmod_iterate.c
  27. +1 −1 src/plugins/jni/testmod_jni.c
  28. +1 −1 src/plugins/keytometa/testmod_keytometa.c
  29. +1 −1 src/plugins/line/testmod_line.c
  30. +1 −1 src/plugins/lineendings/testmod_lineendings.c
  31. +1 −1 src/plugins/list/testmod_list.c
  32. +1 −1 src/plugins/lua/testmod_lua.c
  33. +1 −1 src/plugins/mathcheck/testmod_mathcheck.c
  34. +1 −1 src/plugins/mini/testmod_mini.c
  35. +1 −1 src/plugins/mozprefs/testmod_mozprefs.c
  36. +1 −1 src/plugins/network/testmod_network.c
  37. +2 −2 src/plugins/ni/testmod_ni.c
  38. +1 −1 src/plugins/passwd/testmod_passwd.c
  39. +1 −1 src/plugins/python/testmod_python.c
  40. +1 −1 src/plugins/range/testmod_range.c
  41. +1 −1 src/plugins/rename/testmod_rename.c
  42. +1 −1 src/plugins/resolver/testmod_resolver.c
  43. +1 −1 src/plugins/semlock/testmod_semlock.c
  44. +1 −1 src/plugins/simpleini/testmod_simpleini.c
  45. +1 −1 src/plugins/template/testmod_template.c
  46. +1 −2 src/plugins/uname/testmod_uname.c
  47. +1 −1 src/plugins/validation/testmod_validation.c
  48. +1 −1 src/plugins/xerces/testmod_xerces.c
  49. +1 −1 src/plugins/xmltool/testmod_xmltool.c
  50. +1 −1 src/plugins/yajl/testmod_yajl.c
  51. +1 −1 src/plugins/yamlcpp/testmod_yamlcpp.c
  52. +6 −0 tests/cframework/tests.h
@@ -319,7 +319,7 @@ int main (int argc, char ** argv)
test_hostLensFormatting ("augeas/hosts-formatting");
test_order ("augeas/hosts-big");
printf ("\ntest_augeas RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_augeas");
return nbError;
}
@@ -272,6 +272,6 @@ int main (int argc, char ** argv)
test_base64_plugin_regular ();
test_base64_plugin_decoding_error ();
printf ("\n" ELEKTRA_PLUGIN_NAME " RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result (ELEKTRA_PLUGIN_NAME);
return nbError;
}
@@ -90,7 +90,7 @@ int main (int argc, char ** argv)
test_BlockresolverRead ("blockresolver/test.block");
test_BlockresolverWrite ("blockresolver/test.block", "blockresolver/compare.block");
printf ("\ntestmod_blockresolver RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_blockresolver");
return nbError;
}
@@ -115,7 +115,7 @@ int main (int argc, char ** argv)
test_defaultRestore ();
test_defaultError ();
test_userValue ();
printf ("\ntestmod_boolean RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_boolean");
return nbError;
}
@@ -408,7 +408,7 @@ int main (int argc, char ** argv)
test_successfulGetGetGet ();
test_successfulSiblingGets ();
printf ("\ntestmod_cachefilter RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_cachefilter");
return nbError;
}
@@ -94,7 +94,7 @@ int main (int argc, char ** argv)
test_basics ();
test_get ();
printf ("\nResults: %d Test%s done — %d error%s.\n", nbTest, nbTest != 1 ? "s" : "", nbError, nbError != 1 ? "s" : "");
print_result ("testmod_camel");
return nbError;
}
@@ -210,7 +210,7 @@ int main (int argc, char ** argv)
test_config ();
test_otherescape ();
printf ("\ntest_backendhelpers RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_ccode");
return nbError;
}
@@ -668,7 +668,7 @@ int main (int argc, char ** argv)
test_multiCond2NoFail ();
test_multiAssign2 ();
test_multiAssign3 ();
printf ("\ntestmod_conditionals RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_conditionals");
return nbError;
}
@@ -20,6 +20,6 @@ int main (int argc, char ** argv)
TEST_SUITE (PLUGIN_NAME);
printf ("\n" PLUGIN_NAME " RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result (PLUGIN_NAME);
return nbError;
}
@@ -20,6 +20,6 @@ int main (int argc, char ** argv)
TEST_SUITE (PLUGIN_NAME);
printf ("\n" PLUGIN_NAME " RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result (PLUGIN_NAME);
return nbError;
}
@@ -20,6 +20,6 @@ int main (int argc, char ** argv)
TEST_SUITE (PLUGIN_NAME);
printf ("\n" PLUGIN_NAME " RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result (PLUGIN_NAME);
return nbError;
}
@@ -186,7 +186,7 @@ int main (int argc, char ** argv)
testSetColnames ("csvstorage/valid.csv");
testreadwritecomplicated ("csvstorage/complicated.csv");
testreadunescapedDQuote ("csvstorage/unescapedQuote.csv");
printf ("\ntestmod_csvstorage RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_csvstorage");
return nbError;
}
@@ -104,7 +104,7 @@ int main (int argc, char ** argv)
testRfc2822 ("01 Mar 2016 01:00:59", -1);
setlocale (LC_ALL, old_locale);
printf ("\ntestmod_date RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_date");
return nbError;
}
@@ -117,7 +117,7 @@ int main (int argc, char ** argv)
test_readdump("dump_mount_test.edf");
*/
printf ("\ntest_mount RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_mount");
return nbError;
}
@@ -156,7 +156,7 @@ int main (int argc, char ** argv)
testArray ();
testMultiList ();
printf ("\ntestmod_enum RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_enum");
return nbError;
}
@@ -294,6 +294,6 @@ int main (int argc, char ** argv)
test_file_signature_operations ();
test_file_faulty_signature ();
printf ("\n" ELEKTRA_PLUGIN_NAME " RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result (ELEKTRA_PLUGIN_NAME);
return nbError;
}
@@ -135,7 +135,7 @@ int main (int argc, char ** argv)
testWriteMultiLine ("file/multiline");
testRoundTrip ("file/multiline");
printf ("\ntestmod_file RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_file");
return nbError;
}
@@ -143,7 +143,7 @@ int main (int argc, char ** argv)
testEncoding ("filecheck/utf.txt", 1, 1);
testEncoding ("filecheck/iso.txt", 1, (-1));
printf ("\ntestmod_filecheck RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_filecheck");
return nbError;
}
@@ -104,7 +104,7 @@ int main (int argc, char ** argv)
test_readfstab ("fstab/fstab");
test_writefstab ("fstab/fstab-write");
printf ("\ntestmod_fstab RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_fstab");
return nbError;
}
@@ -306,7 +306,7 @@ int main (int argc, char ** argv)
test_namedMatchFlags ();
test_onlyFirstMatchIsApplied ();
printf ("\ntestmod_glob RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_glob");
return nbError;
}
@@ -42,14 +42,14 @@ static void test_basics (void)
int main (int argc, char ** argv)
{
printf ("HASKELLTEMPLATE TESTS\n");
printf ("HASKELL TESTS\n");
printf ("==================\n\n");
init (argc, argv);
test_basics ();
printf ("\ntestmod_haskelltemplate RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_haskell");
return nbError;
}
@@ -151,7 +151,7 @@ int main (int argc, char ** argv)
test_reversibility ();
test_config ();
printf ("\ntestmod_hexcode RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_hexcode");
return nbError;
}
@@ -427,7 +427,7 @@ int main (int argc, char ** argv)
test_readHostsComments ("hosts/hosts-comments");
test_writeHostsComments ("hosts/hosts-comments");
printf ("\ntest_hosts RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_hosts");
return nbError;
}
@@ -194,7 +194,7 @@ int main (int argc, char ** argv)
test_utf8_needed ();
test_utf8_conversation ();
printf ("\ntest_iconv RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_iconv");
return nbError;
}
@@ -608,7 +608,7 @@ int main (int argc, char ** argv)
test_commentDefaultChar ("ini/commentini");
test_readCommentMeta ("ini/testCommentMeta.ini");
test_writeMeta ("ini/writeCommentMeta.ini");
printf ("\ntest_ini RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_ini");
return nbError;
}
@@ -61,7 +61,7 @@ int main (int argc, char ** argv)
test_basics ();
printf ("\ntestmod_iterate RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_iterate");
return nbError;
}
@@ -52,7 +52,7 @@ int main (int argc, char ** argv)
test_helloWorld ();
printf ("\ntest_jni RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_jni");
return nbError;
}
@@ -563,7 +563,7 @@ int main (int argc, char ** argv)
test_appendSameLevel ();
test_restoreOnSet ();
printf ("\ntest_keytometa RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_keytometa");
return nbError;
}
@@ -58,7 +58,7 @@ int main (int argc, char ** argv)
test_readline ();
printf ("\ntest_line RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_line");
return nbError;
}
@@ -64,7 +64,7 @@ int main (int argc, char ** argv)
testvalid ("lineendings/valid1");
testinconsistent ("lineendings/inconsistent");
testinvalid ("lineendings/invalid");
printf ("\ntestmod_lineendings RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_lineendings");
return nbError;
}
@@ -74,7 +74,7 @@ int main (int argc, char ** argv)
doTest ();
printf ("\ntestmod_list RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_list");
return nbError;
}
@@ -134,7 +134,7 @@ int main (int argc, char ** argv)
test_fail ();
test_wrong ();
printf ("\ntest_lua RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_lua");
return nbError;
}
@@ -146,7 +146,7 @@ int main (int argc, char ** argv)
test_multiUp ();
printf ("\ntestmod_mathcheck RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_mathcheck");
char buffer[24];
elektraFtoA (buffer, sizeof (buffer), (1.5));
@@ -131,7 +131,7 @@ int main (int argc, char ** argv)
test_get ();
test_set ();
printf ("\nResults: %d Test%s done — %d error%s.\n", nbTest, nbTest != 1 ? "s" : "", nbError, nbError != 1 ? "s" : "");
print_result ("testmod_mini");
return nbError;
}
@@ -75,7 +75,7 @@ int main (int argc, char ** argv)
test_readPref ("mozprefs/prefs.js");
test_writePref ("mozprefs/prefs.js");
printf ("\ntestmod_mozprefs RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_mozprefs");
return nbError;
}
@@ -102,7 +102,7 @@ int main (int argc, char ** argv)
test_addr ();
printf ("\ntest_backendhelpers RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_network");
return nbError;
}
@@ -27,7 +27,7 @@
#include <string.h>
#undef NDEBUG
#include <assert.h>
#include <tests_plugin.h>
#define BEGIN_TEST(x) \
void x (void) \
@@ -456,6 +456,6 @@ int main (int argc, char ** argv)
TEST (output_modified);
TEST (parse_output);
printf ("%s: %s\n", argv0, (any_fail ? "ONE OR MORE TESTS FAILED" : "all tests passed"));
print_result ("testmod_ni");
return any_fail;
}
@@ -81,7 +81,7 @@ int main (int argc, char ** argv)
test_read_write ();
#endif
printf ("\ntestmod_passwd RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_passwd");
return nbError;
}
@@ -173,7 +173,7 @@ int main (int argc, char ** argv)
test_fail ();
test_wrong ();
printf ("\ntest_python RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_python");
return nbError;
}
@@ -196,7 +196,7 @@ int main (int argc, char ** argv)
setlocale (LC_ALL, old_locale);
elektraFree (old_locale);
printf ("\ntestmod_range RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_range");
return nbError;
}
@@ -456,7 +456,7 @@ int main (int argc, char ** argv)
test_replaceString ();
test_write ();
test_write2 ();
printf ("\ntest_rename RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("test_rename");
return nbError;
}
@@ -281,7 +281,7 @@ int main (int argc, char ** argv)
test_tempname ();
printf ("\ntest_backendhelpers RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_resolver");
return nbError;
}
@@ -58,7 +58,7 @@ int main (int argc, char ** argv)
test_OpenClose ();
test_GetSet ();
printf ("\ntestmod_semlock RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);
print_result ("testmod_semlock");
return nbError;
}
Oops, something went wrong.

0 comments on commit 0adfef6

Please sign in to comment.