mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
Split const command out into separate file (#9445)
This commit is contained in:
committed by
GitHub
parent
272c55cd55
commit
2a48058428
25
tests/commands/const.rb
Normal file
25
tests/commands/const.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'minitest/autorun'
|
||||
require_relative '../../commands/const'
|
||||
|
||||
class ConstCommandTest < Minitest::Test
|
||||
def test_no_arguments
|
||||
expected_output = 'CREW_FNO_LTO_LDFLAGS=-fno-lto'
|
||||
assert_output(/#{Regexp.escape(expected_output)}/, nil) do
|
||||
Command.const(nil)
|
||||
end
|
||||
end
|
||||
|
||||
def test_valid_constant
|
||||
expected_output = "CREW_FNO_LTO_LDFLAGS=-fno-lto\n"
|
||||
assert_output expected_output, nil do
|
||||
Command.const('CREW_FNO_LTO_LDFLAGS')
|
||||
end
|
||||
end
|
||||
|
||||
def test_invalid_constant
|
||||
expected_output = "Constant INVALID not found\n"
|
||||
assert_output expected_output, nil do
|
||||
Command.const('INVALID')
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user