added bats

This commit is contained in:
Maciek Swiech 2020-05-31 19:50:36 -06:00
parent fe81a40fe7
commit cd878c2cb5
6 changed files with 24 additions and 0 deletions

9
.gitmodules vendored Normal file
View File

@ -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

View File

@ -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_

8
test/bats Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bats
source bashtop
@test "im a toy" {
result=$(echo hello)
[ "$result" = "hello" ]
}

1
test/libs/bats Submodule

@ -0,0 +1 @@
Subproject commit 03608115df2071fff4eaaff1605768c275e5f81f

1
test/libs/bats-assert Submodule

@ -0,0 +1 @@
Subproject commit 9f88b4207da750093baabc4e3f41bf68f0dd3630

@ -0,0 +1 @@
Subproject commit 004e707638eedd62e0481e8cdc9223ad471f12ee