exbotanical / print-assert

Assertion primitives for matching on stdout and stderr output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

print-assert

Assertion primitives for matching on stdout and stderr output.

#include <print_assert.h>

int
main (void)
{
  pa_setup();

  printf("hello\n");
  pa_expect_stdout("hello\n");

  printf("hello.txt");
  pa_expect_stdout("*.txt");

  printf("holt");
  pa_expect_stdout("h**t");

  fprintf(stderr, "123example");
  pa_expect_stderr("[0-9]*");

  pa_teardown();
}

About

Assertion primitives for matching on stdout and stderr output

License:MIT License


Languages

Language:C 77.4%Language:Makefile 20.6%Language:Dockerfile 1.6%Language:Shell 0.4%