Skip to content

Commit

Permalink
Add tests for file dependency normalization behavior
Browse files Browse the repository at this point in the history
There were no tests whatsoever for versioned file dependency
normalization, add some. This reveals that only filter unversioned
dependencies, but we do not filter multiple versions. I don't know
whether this is intended or not, but considering this is only done
for requires, recommends and suggests, we probably should.
  • Loading branch information
pmatilai committed May 17, 2024
1 parent 6bd1e43 commit fac825c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/rpmbuild.at
Original file line number Diff line number Diff line change
Expand Up @@ -1089,12 +1089,25 @@ RPMTEST_CHECK([
RPMDB_INIT

runroot rpmbuild -bb --quiet \
--define '__script_requires() foo(%{basename:%{1}})' \
--define '__script_requires() \
foo(%{basename:%{1}})\
many(%{basename:%{1}}) = 55\
many(%{basename:%{1}}) = 99\
many(%{basename:%{1}})\
bar(%{basename:%{1}}) = 33\
bar(%{basename:%{1}})\
bar(%{basename:%{1}}) = 66\
one(%{basename:%{1}}) = 77'\
/data/SPECS/shebang.spec
runroot rpm -qp --requires /build/RPMS/noarch/shebang-0.1-1.noarch.rpm|grep -v ^rpmlib
],
[0],
[foo(shebang)
[bar(shebang) = 33
bar(shebang) = 66
foo(shebang)
many(shebang) = 55
many(shebang) = 99
one(shebang) = 77
],
[])
RPMTEST_CLEANUP
Expand Down

0 comments on commit fac825c

Please sign in to comment.