<commit_before>require_relative "shared_examples"

describe UnpackStrategy::Subversion do
  let(:repo) { mktmpdir }
  let(:working_copy) { mktmpdir }
  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 "#extract", children: ["test"]

  context "when the directory name contains an '@' symbol" do
    let(:working_copy) { mktmpdir(["", "@1.2.3"])  }

    include_examples "#extract", children: ["test"]<commit_msg>test/unpack_strategy/subversion: Skip when svn is unavailable<commit_after>require_relative "shared_examples"

describe UnpackStrategy::Subversion do
  let(:repo) { mktmpdir }
  let(:working_copy) { mktmpdir }
  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

  context "when svn is available", :needs_svn do
    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
{'fraction_non_alphanumeric': 0.15476942514213518, 'fraction_numerical': 0.003790271636133923, 'mean_word_length': 4.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '252833', 'n_tokens_mistral': 530, 'n_tokens_neox': 507, 'n_words': 130}