Requires: rust-memchr
Requires: rust-regex-syntax
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+%if 0%{?run_tests}
+BuildRequires: rust-quickcheck
+%endif
+
%description
Automata construction and matching using regular expressions.
--extern memchr=%{_rust_dylibdir}/libmemchr.so \
./src/lib.rs
+%check
+%if 0%{?run_tests}
+%{rustc_std_build} --test --crate-type=dylib \
+ --crate-name=%{real_crate_name} \
+ %{?rustc_edition:--edition=%{rustc_edition}} \
+ --cfg='feature="std"' \
+ --cfg='feature="alloc"' \
+ --cfg='feature="syntax"' \
+ --extern memchr=%{_rust_dylibdir}/libmemchr.so \
+ %rust_dylib_extern quickcheck \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
# ==========================================================
# install section
# ==========================================================