tests: fix regex used for replacing "# Generated by rust2rpm NNN"

This commit is contained in:
Fabio Valentini 2022-10-26 12:30:25 +02:00
parent ff04186184
commit f6cac07c8d
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF
4 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# Generated by rust2rpm 22 # Generated by rust2rpm NNN
%bcond_without check %bcond_without check
%global crate cxx-build %global crate cxx-build

View file

@ -15,7 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# Generated by rust2rpm 22 # Generated by rust2rpm NNN
%bcond_without check %bcond_without check
%global crate nix %global crate nix

View file

@ -15,7 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
# Generated by rust2rpm 22 # Generated by rust2rpm NNN
%bcond_without check %bcond_without check
%global crate tokio %global crate tokio

View file

@ -70,7 +70,7 @@ def test_spec(tomlfile, target, tmpdir):
crate = tomlfile.with_suffix("").name crate = tomlfile.with_suffix("").name
spec = mock_spec_file_render(crate, tomlfile, target, tmpdir) spec = mock_spec_file_render(crate, tomlfile, target, tmpdir)
spec = re.sub("^(# Generated by rust2rpm) .*", r"\1 NNN", spec) spec = re.sub("(# Generated by rust2rpm) .*", r"\1 NNN", spec)
if os.getenv("SAVE_SPECS") == "1": if os.getenv("SAVE_SPECS") == "1":
# helper mode to create test data # helper mode to create test data