mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Make sure trailing newline is preserved when ignoring deprecations in functional tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
91c0f1e83b
commit
23fdecd9c3
1 changed files with 4 additions and 2 deletions
|
@ -44,11 +44,13 @@ module Inspec
|
|||
end
|
||||
|
||||
def stderr_ignore_deprecations
|
||||
stderr.split("\n").reject { |l| l.include? ' DEPRECATION: ' }.join("\n")
|
||||
suffix = stderr.end_with?("\n") ? "\n" : ''
|
||||
stderr.split("\n").reject { |l| l.include? ' DEPRECATION: ' }.join("\n") + suffix
|
||||
end
|
||||
|
||||
def stdout_ignore_deprecations
|
||||
stdout.split("\n").reject { |l| l.include? ' DEPRECATION: ' }.join("\n")
|
||||
suffix = stdout.end_with?("\n") ? "\n" : ''
|
||||
stdout.split("\n").reject { |l| l.include? ' DEPRECATION: ' }.join("\n") + suffix
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue