Mike McQuaid 69c1b4fcf9
subversion_spec: fix svnadmin calls on Linux.
Ensure that we only use `xcrun` on Catalina or newer.
2019-10-10 10:45:22 +01:00

30 lines
868 B
Ruby

# frozen_string_literal: true
require_relative "shared_examples"
describe UnpackStrategy::Subversion, :needs_svn do
let(:repo) { mktmpdir }
let(:working_copy) { mktmpdir }
let(:path) { working_copy }
before do
svnadmin = ["svnadmin"]
svnadmin = ["xcrun", *svnadmin] if OS.mac? && MacOS.version >= :catalina
safe_system(*svnadmin, "create", repo)
safe_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 "#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