inspec/test/integration/default/controls/vbscript_spec.rb
Miah Johnson 659b4b373a Remove # encoding: utf8 magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 16:06:23 -07:00

26 lines
576 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