mirror of https://github.com/aristocratos/bashtop
adding tests and travis yml
parent
cd878c2cb5
commit
8f4a00f727
|
@ -0,0 +1,10 @@
|
||||||
|
udo: false
|
||||||
|
language: bash
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- sourceline: 'ppa:duggan/bats'
|
||||||
|
packages:
|
||||||
|
- bats
|
||||||
|
- bc
|
||||||
|
script: bats ./test/*.bats
|
|
@ -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 ]
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env bats
|
|
||||||
|
|
||||||
source bashtop
|
|
||||||
|
|
||||||
@test "im a toy" {
|
|
||||||
result=$(echo hello)
|
|
||||||
[ "$result" = "hello" ]
|
|
||||||
}
|
|
|
@ -0,0 +1 @@
|
||||||
|
source bashtop
|
Loading…
Reference in New Issue