2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-07-23 20:59:21 +02:00
|
|
|
require_relative "shared_examples"
|
|
|
|
|
2024-02-18 15:11:11 -08:00
|
|
|
RSpec.describe UnpackStrategy::Subversion, :needs_svn do
|
2018-07-30 16:59:51 +02:00
|
|
|
let(:repo) { mktmpdir }
|
|
|
|
let(:working_copy) { mktmpdir }
|
2018-07-23 20:59:21 +02:00
|
|
|
let(:path) { working_copy }
|
|
|
|
|
2018-09-20 09:07:56 +01:00
|
|
|
before do
|
2019-11-06 14:58:33 +00:00
|
|
|
safe_system "svnadmin", "create", repo
|
2019-10-08 17:39:31 +01:00
|
|
|
safe_system "svn", "checkout", "file://#{repo}", working_copy
|
2018-07-30 16:59:51 +02:00
|
|
|
|
|
|
|
FileUtils.touch working_copy/"test"
|
|
|
|
system "svn", "add", working_copy/"test"
|
|
|
|
system "svn", "commit", working_copy, "-m", "Add `test` file."
|
|
|
|
end
|
|
|
|
|
2018-07-23 20:59:21 +02:00
|
|
|
include_examples "UnpackStrategy::detect"
|
|
|
|
include_examples "#extract", children: ["test"]
|
2018-07-30 16:59:51 +02:00
|
|
|
|
|
|
|
context "when the directory name contains an '@' symbol" do
|
|
|
|
let(:working_copy) { mktmpdir(["", "@1.2.3"]) }
|
|
|
|
|
|
|
|
include_examples "#extract", children: ["test"]
|
|
|
|
end
|
2018-07-23 20:59:21 +02:00
|
|
|
end
|