示例#1
0
int
main (void)
{
  struct stat statinfo[NFILES];
  struct timespec modtimes[NFILES];
  struct timespec birthtimes[NFILES];

#ifdef SIGHUP
  signal (SIGHUP, cleanup);
#endif
#ifdef SIGINT
  signal (SIGINT, cleanup);
#endif
#ifdef SIGQUIT
  signal (SIGQUIT, cleanup);
#endif
#ifdef SIGTERM
  signal (SIGTERM, cleanup);
#endif

  cleanup (0);
  prepare_test (statinfo, modtimes);
  test_mtime (statinfo, modtimes);
  test_ctime (statinfo);
  test_birthtime (statinfo, modtimes, birthtimes);

  cleanup (0);
  return 0;
}
示例#2
0
int
main ()
{
    struct stat statinfo[NFILES];
    struct timespec modtimes[NFILES];
    struct timespec birthtimes[NFILES];

#ifdef SIGHUP
    signal (SIGHUP, cleanup);
#endif
#ifdef SIGINT
    signal (SIGINT, cleanup);
#endif
#ifdef SIGQUIT
    signal (SIGQUIT, cleanup);
#endif
#ifdef SIGTERM
    signal (SIGTERM, cleanup);
#endif

    cleanup (0);
    prepare_test (statinfo, modtimes);
    test_mtime (statinfo, modtimes);
    /* Skip the ctime tests on native Windows platforms, because there st_ctime
       is either the same as st_mtime (plus or minus an offset) or set to the
       file _creation_ time, and is not influenced by rename or chmod.  */
#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
    test_ctime (statinfo);
#endif
    test_birthtime (statinfo, modtimes, birthtimes);

    cleanup (0);
    return 0;
}
示例#3
0
文件: test.c 项目: tmud/libs
int main(int argc, char *argv[]) {
  UNUSED(argc);
  UNUSED(argv);

  remove(ZIPNAME);

  test_write();
  test_append();
  test_read();
  test_extract();
  test_total_entries();
  test_entry_name();
  test_entry_index();
  test_entry_openbyindex();
  test_list_entries();
  test_fwrite();
  test_read_permissions();
  test_write_permissions();
  test_exe_permissions();
  test_mtime();

  remove(ZIPNAME);
  return 0;
}