diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-19 23:12:01 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-20 19:55:17 -0500 |
commit | 172d5b65616b37b84ba71dd421d8a1314bd53288 (patch) | |
tree | 9fab41f17776aff4f7f1f8d4c38960e9e2a84a6c | |
parent | 0c86e70bf0a4bd25c7b87a428eb3a6f800436b30 (diff) | |
download | rneovim-172d5b65616b37b84ba71dd421d8a1314bd53288.tar.gz rneovim-172d5b65616b37b84ba71dd421d8a1314bd53288.tar.bz2 rneovim-172d5b65616b37b84ba71dd421d8a1314bd53288.zip |
test: rewrite powershell tests to remove timeout
TSAN kept failing and Appveyor sometimes fails on the same test.
-rw-r--r-- | test/functional/ui/output_spec.lua | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index d7dde6345f..3826707743 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -232,20 +232,53 @@ describe("shell command :!", function() if has_powershell() then it('powershell supports literal strings', function() set_shell_powershell() - local screen = Screen.new(30, 4) + local screen = Screen.new(45, 4) screen:attach() feed_command([[!'Write-Output $a']]) - screen:expect{any='\nWrite%-Output %$a', timeout=10000} + screen:expect([[ + :!'Write-Output $a' | + Write-Output $a | + | + Press ENTER or type command to continue^ | + ]]) feed_command([[!$a = 1; Write-Output '$a']]) - screen:expect{any='\n%$a', timeout=10000} + screen:expect([[ + :!$a = 1; Write-Output '$a' | + $a | + | + Press ENTER or type command to continue^ | + ]]) feed_command([[!"Write-Output $a"]]) - screen:expect{any='\nWrite%-Output', timeout=10000} + screen:expect([[ + :!"Write-Output $a" | + Write-Output | + | + Press ENTER or type command to continue^ | + ]]) feed_command([[!$a = 1; Write-Output "$a"]]) - screen:expect{any='\n1', timeout=10000} - feed_command(iswin() - and [[!& 'C:\\Windows\\system32\\cmd.exe' /c 'echo $a']] - or [[!& '/bin/sh' -c 'echo ''$a''']]) - screen:expect{any='\n%$a', timeout=10000} + screen:expect([[ + :!$a = 1; Write-Output "$a" | + 1 | + | + Press ENTER or type command to continue^ | + ]]) + if iswin() then + feed_command([[!& 'cmd.exe' /c 'echo $a']]) + screen:expect([[ + :!& 'cmd.exe' /c 'echo $a' | + $a | + | + Press ENTER or type command to continue^ | + ]]) + else + feed_command([[!& '/bin/sh' -c 'echo ''$a''']]) + screen:expect([[ + :!& '/bin/sh' -c 'echo ''$a''' | + $a | + | + Press ENTER or type command to continue^ | + ]]) + end end) end end) |