Skip to content

Commit

Permalink
ignore progress for appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Aug 16, 2016
1 parent 050e3e7 commit b126880
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/windows/local_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,24 @@
end

it 'run echo test' do
cmd = conn.run_command('Write-Output "test"')
cmd = conn.run_command('$ProgressPreference=’SilentlyContinue’;Write-Output "test"')
cmd.stdout.must_equal "test\r\n"
cmd.stderr.must_equal ''
end

it 'use powershell piping' do
cmd = conn.run_command("New-Object -Type PSObject | Add-Member -MemberType NoteProperty -Name A -Value (Write-Output 'PropertyA') -PassThru | Add-Member -MemberType NoteProperty -Name B -Value (Write-Output 'PropertyB') -PassThru | ConvertTo-Json")
cmd = conn.run_command("$ProgressPreference=’SilentlyContinue’;New-Object -Type PSObject | Add-Member -MemberType NoteProperty -Name A -Value (Write-Output 'PropertyA') -PassThru | Add-Member -MemberType NoteProperty -Name B -Value (Write-Output 'PropertyB') -PassThru | ConvertTo-Json")
cmd.stdout.must_equal "{\r\n \"A\": \"PropertyA\",\r\n \"B\": \"PropertyB\"\r\n}\r\n"
cmd.stderr.must_equal ''
end

it 'check file versioning on windows' do
# may break when appveyor upgrades
file = conn.file("C:/Ruby21/bin/ruby.exe")
file.product_version.must_equal '7.9.9600.16384'
file.file_version.must_equal '7.9.9600.16384 (winblue_rtm.130821-1623)'
end

after do
# close the connection
conn.close
Expand Down

0 comments on commit b126880

Please sign in to comment.