[packages/perl-Test-Snapshot] Initial
arekm
arekm at pld-linux.org
Mon Sep 18 09:14:25 CEST 2023
commit f95ce0e56d126c3dd4f8fbc92dc43eecb9c318f2
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Sep 18 07:54:21 2023 +0200
Initial
perl-Test-Snapshot.spec | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
---
diff --git a/perl-Test-Snapshot.spec b/perl-Test-Snapshot.spec
new file mode 100644
index 0000000..f514665
--- /dev/null
+++ b/perl-Test-Snapshot.spec
@@ -0,0 +1,64 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+#
+%define pdir Test
+%define pnam Snapshot
+Summary: Test::Snapshot - test against data stored in automatically-named file
+Name: perl-Test-Snapshot
+Version: 0.06
+Release: 1
+License: artistic_2
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 19ebfa678a7a4f7f186e438bedb2a95c
+# generic URL, check or change before uncommenting
+#URL: https://metacpan.org/dist/Test-Snapshot
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
+%if %{with tests}
+BuildRequires: perl-Capture-Tiny
+BuildRequires: perl-Text-Diff
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Not connected with Test::Snapshots, which is based on a similar
+concept but for running executables.
+
+Implements a function to automate the storing and updating of expected
+test outputs. This is based on the idea known in frontend development
+circles as "snapshot testing", hence the module name.
+
+These snapshots will be stored in files whose names are automatically
+generated from:
+
+If that file is not present, it will be treated as though it contains
+an undef.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes
+%{perl_vendorlib}/Test/Snapshot.pm
+%{_mandir}/man3/Test::Snapshot.3*
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Test-Snapshot.git/commitdiff/f95ce0e56d126c3dd4f8fbc92dc43eecb9c318f2
More information about the pld-cvs-commit
mailing list