Giter VIP home page Giter VIP logo

lembas's Introduction

LEMBAS

Lembas is a testing framework for command line applications inspired by Cram.

SYNOPSIS

use Test::More;
use Lembas;

open my $specs, '<', 'hg-for-dummies.lembas'
    or BAILOUT("can't open Mercurial session test specs: $!");

my $lembas = Lembas->new_from_test_spec(handle => $specs);
plan tests => $lembas->plan_size;
$lembas->run;

DESCRIPTION

In short, you write down shell sessions verbatim, allowing for variance such as "this part here should match this regex" or "then there's some output nobody really cares about" or even "this output should be printed within N seconds". The markup is really very simple so you can almost copy-paste real shell sessions and have it work.

Then Lembas will spawn a shell process of your choice and pass it the commands and test if the output matches what's expected, thereby turning your shell session into a test suite!

EXAMPLES

Examples are provided in the examples/ folder of this distribution.

AUTHOR

Fabrice Gabolde [email protected]

COPYRIGHT AND LICENSE

Copyright (C) 2013 Fabrice Gabolde

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

lembas's People

Watchers

 avatar  avatar  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.