<commit_before>require "testing_env"

class IntegrationCommandTestUses < IntegrationCommandTestCase
  def test_uses
    setup_test_formula "foo"
    setup_test_formula "bar"
    setup_test_formula "baz", <<-EOS.undent
      url "https://example.com/baz-1.0"
      depends_on "bar"
    EOS

    assert_equal "", cmd("uses", "baz")
    assert_equal "baz", cmd("uses", "bar")
    assert_equal "bar\nbaz", cmd("uses", "--recursive", "foo")
  end
end
<commit_msg>uses_test: don't rely on output order.<commit_after>require "testing_env"

class IntegrationCommandTestUses < IntegrationCommandTestCase
  def test_uses
    setup_test_formula "foo"
    setup_test_formula "bar"
    setup_test_formula "baz", <<-EOS.undent
      url "https://example.com/baz-1.0"
      depends_on "bar"
    EOS

    assert_equal "", cmd("uses", "baz")
    assert_equal "baz", cmd("uses", "bar")
    assert_match(/(bar\nbaz|baz\nbar)/, cmd("uses", "--recursive", "foo"))
  end
end

{'fraction_non_alphanumeric': 0.14375655823714587, 'fraction_numerical': 0.004197271773347324, 'mean_word_length': 3.94300518134715, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4131950', 'n_tokens_mistral': 347, 'n_tokens_neox': 324, 'n_words': 70}