mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
Whatprovides unittest (#10385)
* Fix whatprovides: handle case of manifest filelist not corresponding to a package file. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add unit test for whatprovides. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Bump version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove arm manifest for deprecated imagemagick6 package. Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
386f42ff6e
commit
68f183bdfb
21
tests/commands/whatprovides.rb
Normal file
21
tests/commands/whatprovides.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
require 'minitest/autorun'
|
||||
require_relative '../../commands/whatprovides'
|
||||
|
||||
# Add lib to LOAD_PATH
|
||||
$LOAD_PATH << File.join(CREW_LIB_PATH, 'lib')
|
||||
|
||||
String.use_color = false
|
||||
|
||||
class WhatprovidesCommandTest < Minitest::Test
|
||||
def test_whatprovides
|
||||
expected_output = <<~TEST_EOF
|
||||
crew_profile_base: /usr/local/etc/profile
|
||||
|
||||
Total found: 1
|
||||
TEST_EOF
|
||||
assert_output(expected_output, nil) do
|
||||
# Command.whatprovides(regex)
|
||||
Command.whatprovides('/usr/local/etc/profile$')
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -15,6 +15,7 @@ ruby ../tests/commands/help.rb
|
||||
ruby ../tests/commands/list.rb
|
||||
ruby ../tests/commands/prop.rb
|
||||
ruby ../tests/commands/remove.rb
|
||||
ruby ../tests/commands/whatprovides.rb
|
||||
ruby ../tests/lib/docopt.rb
|
||||
if [[ -n ${CHANGED_PACKAGES-} ]]; then
|
||||
all_compatible_packages=$(crew list -d compatible)
|
||||
|
||||
Reference in New Issue
Block a user