Exemplo n.º 1
0
int main(void)
{
  static struct dstring ds;

  initfree_test(&ds);
  cat_test(&ds);
  copy_test(&ds);
  chop_test(&ds);

  return 0;
}
Exemplo n.º 2
0
int main(int argc, char **argv)
{
	int rc = 0;
	int nr_round;

	if (argc < 3) {
		usage();
		goto out;
	}

	if (strcmp(argv[1], "-n") != 0) {
		usage();
		goto out;
	}

	nr_round = atoi(argv[2]);
	if (nr_round == 0) {
		usage();
		goto out;
	}
	
	do {
		rc = unit_test(nr_round);
		if (rc != 0) {
			printf("unit_test failed.\n");
		} else {
			printf("unit_test finished with round %d.\n", nr_round);
		}
		
	} while (FALSE);

	echo_test();
	
	mkdir_test();

	ls_test();

	cd_test();

	cat_test();

	date_test();

	lsmod_test();

	null_dev_test();

	multi_processes_test();

	clear_test();

	shutdown_test();

	while (TRUE) {
		;
	}

 out:

	return rc;
}