mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
Tighten help listing assertion and adjust chomp
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
569f459eba
commit
e346b16114
2 changed files with 2 additions and 4 deletions
|
@ -158,7 +158,7 @@ module Inspec
|
|||
end
|
||||
input_name, input_value = pair.split("=")
|
||||
evt = Inspec::Input::Event.new(
|
||||
value: input_value.sub(/,$/, ""), # Trim trailing comma if any
|
||||
value: input_value.chomp(","), # Trim trailing comma if any
|
||||
provider: :cli,
|
||||
priority: 50
|
||||
)
|
||||
|
|
|
@ -46,9 +46,7 @@ describe "inputs" do
|
|||
|
||||
it "includes the --input option" do
|
||||
result = run_inspec_process("exec help", lock: true) # --no-create-lockfile option breaks usage help
|
||||
lines = result.stdout.lines
|
||||
line = lines.detect { |l| l.include? "--input" }
|
||||
line.wont_be_nil
|
||||
assert_match(/--input\s/, result.stdout) # Careful not to match --input-file
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue