Compare commits
1 Commits
main
...
issue/1886
| Author | SHA1 | Date |
|---|---|---|
|
|
1f438bcf2a |
|
|
@ -530,6 +530,21 @@ describe FPM::Package::RPM do
|
||||||
insist { rpm.files } == [ "/example/%name%" ]
|
insist { rpm.files } == [ "/example/%name%" ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should correctly include files with spaces and quotation marks" do
|
||||||
|
names = [
|
||||||
|
"/It's time to go.txt",
|
||||||
|
"/It's \"time\" to go.txt"
|
||||||
|
]
|
||||||
|
|
||||||
|
names.each do |n|
|
||||||
|
File.write(subject.staging_path("#{n}"), "Hello")
|
||||||
|
end
|
||||||
|
subject.output(@target)
|
||||||
|
|
||||||
|
rpm = ::RPM::File.new(@target)
|
||||||
|
insist { rpm.files.sort } == names.sort
|
||||||
|
end
|
||||||
|
|
||||||
it "should escape '%' characters in filenames while preserving permissions" do
|
it "should escape '%' characters in filenames while preserving permissions" do
|
||||||
Dir.mkdir(subject.staging_path("/example"))
|
Dir.mkdir(subject.staging_path("/example"))
|
||||||
File.write(subject.staging_path("/example/%name%"), "Hello")
|
File.write(subject.staging_path("/example/%name%"), "Hello")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue