Giter VIP home page Giter VIP logo

picotap's Introduction

picotap

A tiny TAP generator library and TAP parser in C for Linux, OSX

Introduction

picotap is a tiny TAP generator library (test) and TAP parser (test harness) written in C. It was inspired by code in kazuho's github projects.

Prequisites

C Prequisites:

  • tap requires GCC or clang/LLVM on Linux or OSX

If you get stuck in Linux or OSX, try typing make help or looking at the Examples directory.

Building

Try the following:

  • make
  • make help
  • make libtap
  • make ptap
  • make install
  • make tests
  • make runtest
  • make runtap

Examples

Making a TAP generator (a test) in C

  • In picotap/, type: make libtap
  • Include tap.h into your test file
  • Start your test source with plan( 10 ); // If your test plan includes 10 tests
  • Each test is of the form ok( condition, "Info about the test" );
  • condition can be any expression that resolves to true/false
  • For output to stdout not part of the test plan results
    • Prefix with a space, tab, or #
  • Compile your test code by including the path to tap.h and linking to libptap.a cc test.c -I./picotap -L. -lptap -o test.exe
  • See the picotap/t directory and the make tests command in picotap/Makefile

Making a TAP parser run (test harness) in C

  • In picotap/, type: make ptap
  • Execute the test via the tap parser ./ptap /PATH/TO/test.exe
  • ptap will open a pipe to test.exe, reading its stdout and parse it
  • For output to stdout not part of the test plan results
    • Prefix with a space, tab, or #

picotap's People

Contributors

lpsantil avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.