<commit_before>def build_regexp(pattern, options)
  Regexp.new(pattern, options.each_char.inject(0) do |m, e|
    m | case e
      when ?i then Regexp::IGNORECASE
      when ?m then Regexp::MULTILINE
      when ?x then Regexp::EXTENDED
    end
  end)
end


Then /^the output must contain exactly the usage$/ do
  expect(last_command_started.output).to eq <<-eoh
Usage: scube [options] command

options:
    -v, --verbose                    enable verbose mode
    -h, --help                       print this message
    -V, --version                    print version

commands:
  import   Import local sound file into scube
  ping     Ping scube server
  ping:auth Ping scube server (authenticated)
  signin   Signin and get authentication token<commit_msg>Fix usage tests<commit_after>def build_regexp(pattern, options)
  Regexp.new(pattern, options.each_char.inject(0) do |m, e|
    m | case e
      when ?i then Regexp::IGNORECASE
      when ?m then Regexp::MULTILINE
      when ?x then Regexp::EXTENDED
    end
  end)
end


Then /^the output must contain exactly the usage$/ do
  expect(last_command_started.output).to eq <<-eoh
Usage: scube [options] command

options:
    -v, --verbose                    enable verbose mode
    -h, --help                       print this message
    -V, --version                    print version

commands:
  import   Import local sound file into scube
  list     List resources
  ping     Ping scube server
  ping:auth Ping scube server (authenticated)
  signin   Signin and get authentication token
{'fraction_non_alphanumeric': 0.07522697795071336, 'fraction_numerical': 0.0012970168612191958, 'mean_word_length': 2.398678414096916, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6934924', 'n_tokens_mistral': 481, 'n_tokens_neox': 456, 'n_words': 164}