aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-toml
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-12 23:01:36 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-12 23:06:28 +0100
commit379d4f0052687d72615318b8ab4b3b072bd694a9 (patch)
tree9b7a9916db3498cb342ced604a22bc846bf7a83f /community/lua-toml
parentc2894136347bb89afe1f543215fc6098074388a5 (diff)
downloadaports-379d4f0052687d72615318b8ab4b3b072bd694a9.tar.bz2
aports-379d4f0052687d72615318b8ab4b3b072bd694a9.tar.xz
community/lua-toml: add check function
Diffstat (limited to 'community/lua-toml')
-rw-r--r--community/lua-toml/APKBUILD13
1 files changed, 12 insertions, 1 deletions
diff --git a/community/lua-toml/APKBUILD b/community/lua-toml/APKBUILD
index 9cc1c56b38..a04a8cdbb2 100644
--- a/community/lua-toml/APKBUILD
+++ b/community/lua-toml/APKBUILD
@@ -2,20 +2,31 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-toml
pkgver=1.0
-pkgrel=0
+pkgrel=1
pkgdesc="TOML decoder/encoder for Lua"
url="https://github.com/jonstoler/lua-toml"
arch="noarch"
license="Happy"
depends=""
+checkdepends="luajit lua-busted"
source="$pkgname-$pkgver.tar.gz::https://github.com/jonstoler/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+ checkdepends="$checkdepends lua$_v"
done
+check() {
+ cd "$builddir"
+
+ local lver; for lver in $_luaversions jit; do
+ msg "Testing on lua$lver"
+ lua$lver /usr/bin/busted || return 1
+ done
+}
+
package() {
mkdir -p "$pkgdir"
}