/*
 * $Log: url_test,v $
 * Revision 1.2  1998/05/28 19:41:11  joseph
 * Changed all printf()'s to debug_printf(())'s
 *
 * Revision 1.1.1.1  1997/12/29 14:37:55  jogu
 * WebGet Initial CMS Ver
 *
 */

#include <stdio.h>

#define BOOL int
#include "flex.h"
#undef BOOL

#include "url.h"


int main(void)
{
  flex_init("url_test", NULL);
  url_init();

  debug_printf(("return code = %d\n",url_addto(FOUND, "http://poppy/")));
  debug_printf(("return code = %d\n",url_addto(FOUND, "http://whooosh/")));
  debug_printf(("return code = %d\n",url_addto(FOUND, "http://wibble/")));
  debug_printf(("return code = %d\n",url_addto(FOUND, "http://wobbledf/")));
  debug_printf(("return code = %d\n",url_addto(FOUND, "http://wib/")));

  debug_printf(("Present : %s\n",url_present(FOUND,"http://whooosh/") ? "Yes" : "No"));
  debug_printf(("Present : %s\n",url_present(FOUND,"http://whooosh") ? "Yes" : "No"));
  debug_printf(("Present : %s\n",url_present(FOUND,"http://whooosh/?") ? "Yes" : "No"));

  debug_printf(("Removed : %s\n",url_remove(FOUND,"http://whooosh/") ? "Yes" : "No"));

  debug_printf(("Promote, return code = %d\n",url_promote(FOUND, "http://wobbledf/")));

  url_dump(FOUND,TASK_DIR".found");

  return 0;
}
