Merge pull request #4573 from reitermarkus/subversion-spec
Add spec for SVN directory name containing `@`.
This commit is contained in:
commit
ddbefee44a
@ -1,22 +1,26 @@
|
|||||||
require_relative "shared_examples"
|
require_relative "shared_examples"
|
||||||
|
|
||||||
describe UnpackStrategy::Subversion do
|
describe UnpackStrategy::Subversion do
|
||||||
let(:repo) {
|
let(:repo) { mktmpdir }
|
||||||
mktmpdir.tap do |repo|
|
let(:working_copy) { mktmpdir }
|
||||||
system "svnadmin", "create", repo
|
|
||||||
end
|
|
||||||
}
|
|
||||||
let(:working_copy) {
|
|
||||||
mktmpdir.tap do |working_copy|
|
|
||||||
system "svn", "checkout", "file://#{repo}", working_copy
|
|
||||||
|
|
||||||
FileUtils.touch working_copy/"test"
|
|
||||||
system "svn", "add", working_copy/"test"
|
|
||||||
system "svn", "commit", working_copy, "-m", "Add `test` file."
|
|
||||||
end
|
|
||||||
}
|
|
||||||
let(:path) { working_copy }
|
let(:path) { working_copy }
|
||||||
|
|
||||||
|
before(:each) do
|
||||||
|
system "svnadmin", "create", repo
|
||||||
|
|
||||||
|
system "svn", "checkout", "file://#{repo}", working_copy
|
||||||
|
|
||||||
|
FileUtils.touch working_copy/"test"
|
||||||
|
system "svn", "add", working_copy/"test"
|
||||||
|
system "svn", "commit", working_copy, "-m", "Add `test` file."
|
||||||
|
end
|
||||||
|
|
||||||
include_examples "UnpackStrategy::detect"
|
include_examples "UnpackStrategy::detect"
|
||||||
include_examples "#extract", children: ["test"]
|
include_examples "#extract", children: ["test"]
|
||||||
|
|
||||||
|
context "when the directory name contains an '@' symbol" do
|
||||||
|
let(:working_copy) { mktmpdir(["", "@1.2.3"]) }
|
||||||
|
|
||||||
|
include_examples "#extract", children: ["test"]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user