Giter Site home page Giter Site logo

lunit's Introduction

lunit - Unit Testing Framework for Lua.

  • Provides 27 assert functions, and a few misc functions for usage in an easy unit testing framework.
  • Comes with a test suite to test itself. The testsuite consists of approximately 710 assertions.
  • Licensed under the MIT license.

Actual state

This package is not maintained anymore. It is here for pure historically reasons for your interest.

Example

Source: example.lua:

require "lunit"

module( "my_testcase", lunit.testcase )

function test_success()
  assert_false( false, "This test never fails.")
end

function test_failure()
  fail( "This test always fails!" )
end

lunit.main(...)

Run tests:

# lua example.lua 
    F.

2 Assertions checked.

  1) Failure (my_testcase.test_failure):
example.lua:10: failure
example.lua:10: This test always fails!

Testsuite finished (1 passed, 1 failed, 0 errors).

Homepage

https://www.mroth.net/lunit

Source code

GitHub repository:

git clone https://github.com/mrothNET/lunit.git

History

Up to today

  • lunit no longer depends on lunit.sh. The script moved to the extra-directory.

2009-11-05 / Release 0.5

  • New test function assert_error_match().
  • lunit shell script returns an error code on failed tests.
  • Be more compatible with Darwin / Mac OS X.
  • Bug fixes.

2008-01-05 / Release 0.4

  • Mostly complete rewrite.
  • Lua-5.1 only.

2004-08-22 / Release 0.3 (alpha)

  • New function lunit.wrap() to wrap a single function in a complete test case.
  • Now a backtrace is printed, if an error or failure occurs in a test case.

2004-08-18 / Release 0.2 (alpha)

  • The test suite consists now of approximately 630 assertions.
  • Fixed an ugly bug in lunit.assert()! Testcases for lunit.assert() added.
  • Now all assert functions return the actual value on success.

2004-08-15 / Release 0.1 (alpha)

  • First public release!

Contact

Send email to: [email protected]

lunit's People

Contributors

mrothnet avatar dirkfeytons avatar steven-aerts avatar harningt avatar timcharper avatar

Stargazers

GSchenck avatar  avatar hlizard avatar Andrii Syrokomskyi avatar MrB. avatar  avatar  avatar

Watchers

 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.