Package Init

This commit is contained in:
qiegewala 2019-12-05 17:16:02 +08:00
parent abb7cfe6ba
commit b467069306
2 changed files with 43 additions and 0 deletions

43
lua-lunit.spec Normal file
View File

@ -0,0 +1,43 @@
Name: lua-lunit
Version: 0.5
Release: 15
Summary: Unit testing framework for Lua
License: MIT
URL: http://nessie.de/mroth/lunit/index.html
Source0: http://nessie.de/mroth/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
* Mon Dec 2 2019 lijin Yang <yanglijin@huawei.com> - 0.5-15
- init package

BIN
lunit-0.5.tar.gz Normal file

Binary file not shown.