Code Monkey home page Code Monkey logo

inferno-contrib-tap's Introduction

Description

Test Anything Protocol module for Limbo. This module is TAP Producer.

Install

Make directory with this module available in /opt/powerman/tap/.

Install system-wide:

# git clone https://github.com/powerman/inferno-contrib-tap.git $INFERNO_ROOT/opt/powerman/tap

or in your home directory:

$ git clone https://github.com/powerman/inferno-contrib-tap.git $INFERNO_USER_HOME/opt/powerman/tap
$ emu
; bind opt /opt

or locally for your project:

$ git clone https://github.com/powerman/inferno-contrib-tap.git $YOUR_PROJECT_DIR/opt/powerman/tap
$ emu
; cd $YOUR_PROJECT_DIR_INSIDE_EMU
; bind opt /opt

If you want to run commands and read man pages without entering full path to them (like /opt/VENDOR/APP/dis/cmd/NAME) you should also install and use https://github.com/powerman/inferno-opt-setup

Dependencies

Usage

Write tests for your app using this module.

Using mkfiles and helper script runtest.sh provided by https://github.com/powerman/inferno-opt-mkfiles you can run mk test both in host OS and Inferno. While there no available TAP consumer for Inferno yet, if you run tests in host OS you can use existing consumer like prove command from Perl module Test::Harness:

powerman@home ~/inferno/opt/powerman/tap/appl/lib $ prove -r
./t/smoke.t .. ok
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.01 cusr  0.00 csys =  0.03 CPU)
Result: PASS

Example

Such include path will let you compile your application using both host OS and native limbo without additional options if this module was installed locally in your project, but if you installed this module system-wide, then you'll need to use -I$INFERNO_ROOT for host OS limbo and -I/ for native limbo.

implement T;

include "opt/powerman/tap/module/t.m";

test()
{
    plan(3);

    ok(1==1,            "true test");
    eq_int(2, 3,        "2 == 3?");
    eq("abc", "def",    "abc == def?");
}

This test will produce output:

1..3
ok 1 - true test
not ok 2 - 2 == 3?
#   Failed test '2 == 3?'
#   in smoke.b:10.4, 27
#          got: 2
#     expected: 3
not ok 3 - abc == def?
#   Failed test 'abc == def?'
#   in smoke.b:11.4, 35
#          got: 'abc'
#     expected: 'def'

inferno-contrib-tap's People

Contributors

powerman avatar

Watchers

James Cloos avatar Tim Newsom 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.