mirror of https://github.com/aristocratos/bashtop
Merge pull request #130 from dotpyfe/feature/bats-testing
Minimal BATS / Travis-CI additionpull/96/head^2
commit
987c798019
|
@ -0,0 +1,9 @@
|
|||
[submodule "test/libs/bats"]
|
||||
path = test/libs/bats
|
||||
url = https://github.com/sstephenson/bats
|
||||
[submodule "test/libs/bats-assert"]
|
||||
path = test/libs/bats-assert
|
||||
url = https://github.com/ztombol/bats-assert
|
||||
[submodule "test/libs/bats-support"]
|
||||
path = test/libs/bats-support
|
||||
url = https://github.com/ztombol/bats-support
|
|
@ -0,0 +1,9 @@
|
|||
# travis does not offer python container for OSX or Windows, not sure if we can get automated testing?
|
||||
os: linux
|
||||
language: python
|
||||
python:
|
||||
- "3.6"
|
||||
dist: bionic
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
script: ./test.sh
|
4
bashtop
4
bashtop
|
@ -4822,6 +4822,10 @@ else
|
|||
exec 2>/dev/null
|
||||
fi
|
||||
|
||||
|
||||
#* if we have been sourced by another shell, quit. Allows sourcing only function definition.
|
||||
[[ "${#BASH_SOURCE[@]}" -gt 1 ]] && { return 0; }
|
||||
|
||||
#* Call init function
|
||||
init_
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
psutil==5.7.0
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
./test/libs/bats/bin/bats test/*.bats
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load 'libs/bats-support/load'
|
||||
load 'libs/bats-assert/load'
|
||||
|
||||
load test_helper
|
||||
|
||||
@test "Sourcing works, by checking if \$system is set" {
|
||||
run echo $system
|
||||
refute_output ""
|
||||
}
|
||||
|
||||
@test "#get_themes populates themes" {
|
||||
get_themes
|
||||
assert_success
|
||||
assert [ ${#themes[@]} -gt 0 ]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 03608115df2071fff4eaaff1605768c275e5f81f
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 9f88b4207da750093baabc4e3f41bf68f0dd3630
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 004e707638eedd62e0481e8cdc9223ad471f12ee
|
|
@ -0,0 +1 @@
|
|||
source bashtop
|
Loading…
Reference in New Issue