skip_all.t.c 465 Bytes
Newer Older
mats@mysql.com's avatar
mats@mysql.com committed
1

2 3
#include "my_config.h"

mats@mysql.com's avatar
mats@mysql.com committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <stdlib.h>
#include <tap.h>

int has_feature() {
  return 0;
}

/*
  In some cases, an entire test file does not make sense because there
  some feature is missing.  In that case, the entire test case can be
  skipped in the following manner.
 */
int main() {
  if (!has_feature())
18
    skip_all("Example of skipping an entire test");
mats@mysql.com's avatar
mats@mysql.com committed
19 20 21 22 23 24 25
  plan(4);
  ok(1, NULL);
  ok(1, NULL);
  ok(1, NULL);
  ok(1, NULL);
  return exit_status();
}