blob: 89e13ea1b1a249ed614b962d2bcf5b91d1c9a65b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# LuaRocks testsuite
## Overview
Test suite for LuaRocks project with Busted unit testing framework(http://olivinelabs.com/busted/).
* Contains unit and integration tests
* Easy setup for your purpose on command line or from configuration file
## Dependencies
* Lua >= 5.1
* Busted with dependencies
## Usage
Running of tests is based on basic Busted usage. *-Xhelper* flag is used
for inserting arguments into testing. Flag *--tags=* or *-t* is used
for specifying which tests will run. Start tests inside
LuaRocks folder or specify with *-C* flag.
**Arguments for Busted helper script**
```
env=<type>, (default:"minimal") type what kind of environment to use ["minimal", "full"]
noreset, Don't reset environment after each test
clean, remove existing testing environment
appveyor, add just if running on Appveyor
ci, add just if running on Unix CI
os=<version>, type your OS ["linux", "os x", "windows"]
```
---------------------------------------------------------------------------------------------
## _**Tags** of tests are required and are in this format:_
**unit** - run all unit tests
**integration** - run all integration tests
**ssh** - run all tests which require ssh
**mock** - run all tests which require mock LuaRocks server (upload tests)
**unix** - run all tests which are UNIX based, won't work on Windows systems
## Examples
To run all tests:
`busted`
To run unit tests in LuaRocks directory type :
`busted -t "unit"`
To run integration tests without tests which use ssh:
`busted -t "integration" --exclude-tags=ssh`
|