lua-lunit/lua-lunit.spec
2020-09-11 09:29:31 +08:00

47 lines
1.2 KiB
RPMSpec

Name: lua-lunit
Version: 0.5
Release: 16
Summary: Unit testing framework for Lua
License: MIT
URL: https://mroth.net/lunit
Source0: https://mroth.net/lunit/lunit-%{version}.tar.gz
BuildRequires: lua >= 5.2
Requires: lua >= 5.2
BuildArch: noarch
%description
Lunit is a unit testing framework for lua, written in lua.
Lunit provides 26 assert functions, and a few misc functions for usage
in an easy unit testing framework.
Lunit comes with a test suite to test itself. The testsuite consists
of approximately 710 assertions.
%prep
%autosetup -n lunit-%{version} -p1
%build
%install
install -d $RPM_BUILD_ROOT%{_bindir}
cp -p lunit $RPM_BUILD_ROOT%{_bindir}
install -d $RPM_BUILD_ROOT%{_datadir}/lua/5.2
cp -pr lunit{,-console}.lua $RPM_BUILD_ROOT%{_datadir}/lua/5.2
%check
./lunit lunit-tests.lua | tee testlog.txt
grep -q "0 failed, 0 errors" testlog.txt
%files
%doc LICENSE ANNOUNCE CHANGES DOCUMENTATION README* example.lua
%{_bindir}/lunit
%{_datadir}/lua/5.2/*
%changelog
* Thu Sep 09 2020 liuweibo <liuweibo10@huawei.com> - 0.5-16
- Fix Source0 and URL
* Mon Dec 2 2019 lijin Yang <yanglijin@huawei.com> - 0.5-15
- init package