diff --git a/lua-lunit.spec b/lua-lunit.spec new file mode 100644 index 0000000..682ac18 --- /dev/null +++ b/lua-lunit.spec @@ -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 - 0.5-15 +- init package + diff --git a/lunit-0.5.tar.gz b/lunit-0.5.tar.gz new file mode 100644 index 0000000..bfc992d Binary files /dev/null and b/lunit-0.5.tar.gz differ