changeset 21322:d80af38e819a

(main) [TEST_CANON_HOST]: Add a simple test driver.
author Jim Meyering <jim@meyering.net>
date Mon, 11 Jan 1999 02:46:33 +0000
parents 773b8c8f4827
children 3e57725bdd34
files lib/canon-host.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib/canon-host.c	Sun Jan 10 23:47:16 1999 +0000
+++ b/lib/canon-host.c	Mon Jan 11 02:46:33 1999 +0000
@@ -78,3 +78,17 @@
 #endif /* HAVE_GETHOSTBYNAME */
   return 0;
 }
+
+#ifdef TEST_CANON_HOST
+int
+main (int argc, char **argv)
+{
+  int i;
+  for (i = 1; i < argc; i++)
+    {
+      char *s = canon_host (argv[i]);
+      printf ("%s: %s\n", argv[i], (s ? s : "<undef>"));
+    }
+  exit (0);
+}
+#endif /* TEST_CANON_HOST */