mirror of
https://github.com/inspec/inspec
synced 2024-12-21 10:33:23 +00:00
2a1b1d8e88
Signed-off-by: Miah Johnson <miah@chia-pet.org>
25 lines
575 B
Ruby
25 lines
575 B
Ruby
return unless os.windows?
|
|
|
|
describe vbscript("WScript.Echo \"hello\"") do
|
|
its('stdout') { should eq "hello\r\n" }
|
|
end
|
|
|
|
# script that may have multiple lines
|
|
vbscript = <<-EOH
|
|
WScript.Echo "hello"
|
|
Wscript.Stdout.Write "end"
|
|
EOH
|
|
|
|
describe vbscript(vbscript) do
|
|
its('stdout') { should eq "hello\r\nend" }
|
|
end
|
|
|
|
# remove whitespace from stdout
|
|
describe vbscript("WScript.Echo \"hello\"") do
|
|
its('strip') { should eq 'hello' }
|
|
end
|
|
|
|
# ensure that we do not require a newline
|
|
describe vbscript("Wscript.Stdout.Write \"hello\"") do
|
|
its('stdout') { should eq 'hello' }
|
|
end
|