<commit_before>#!/usr/bin/ruby -w
# -*- ruby -*-

require 'svnx/status/options'
require 'svnx/options/tc'

class Svnx::Status::OptionsTest < Svnx::Options::TestCase
  def options_class
    Svnx::Status::Options
  end
  
  def test_assign_default
    defexpected = {
      paths: nil,
      url: nil
    }
    assert_options defexpected
  end
  
  def test_assign_paths
    assert_assign paths: [ "a/b", "c/d" ]
  end 
  
  def test_assign_url
    assert_assign url: "p://a/b"
  end

  def create_options optargs = Hash.new
    Svnx::Status::Options.new optargs
  end

  def create_args options
    Svnx::Status::Args.new options
  end
  
  def test_to_args_default
    assert_to_args Array.new
  end
  
  def test_to_args_url
    assert_to_args [ "p://abc" ], url: "p://abc"
  end

  def test_to_args_paths_single
    assert_to_args [ "a/b" ], paths: [ "a/b" ]
  end

  def test_to_args_paths_multiple
    assert_to_args [ "a/b", "c/d" ], paths: [ "a/b", "c/d" ]
  end
end<commit_msg>Parameterize tests of status options.<commit_after>#!/usr/bin/ruby -w
# -*- ruby -*-

require 'svnx/status/options'
require 'svnx/options/tc'
require 'paramesan'

class Svnx::Status::OptionsTest < Svnx::Options::TestCase
  extend Paramesan
  
  def options_class
    Svnx::Status::Options
  end
  
  def test_assign_default
    defexpected = {
      paths: nil,
      url: nil
    }
    assert_options defexpected
  end

  param_test [
    { paths: [ "a/b", "c/d" ] },
    { url: "p://a/b" }
  ].each do |vals|
    assert_assign vals
  end

  param_test [
    [ Array.new, Hash.new ],
    [ [ "p://abc" ], url: "p://abc" ],
    [ [ "a/b" ], paths: [ "a/b" ] ],
    [ [ "a/b", "c/d" ], paths: [ "a/b", "c/d" ] ],
  ].each do |exp, vals|
    assert_to_args exp, vals
  end
end
{'fraction_non_alphanumeric': 0.14789533560864618, 'fraction_numerical': 0.0, 'mean_word_length': 2.703157894736842, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3846474', 'n_tokens_mistral': 691, 'n_tokens_neox': 691, 'n_words': 145}