diff --git a/test/windows/local_test.rb b/test/windows/local_test.rb index a97c4599..a637d6c4 100644 --- a/test/windows/local_test.rb +++ b/test/windows/local_test.rb @@ -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