Mercurial > vim
comparison src/testdir/test_vimscript.vim @ 19954:c087099e9163 v8.2.0533
patch 8.2.0533: tests using term_wait() can still be flaky
Commit: https://github.com/vim/vim/commit/6a2c5a7dd5c9215cc030d5ea6e4616d782c091dd
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 8 21:50:25 2020 +0200
patch 8.2.0533: tests using term_wait() can still be flaky
Problem: Tests using term_wait() can still be flaky.
Solution: Increase the wait time when rerunning a test. (James McCoy,
closes #5899) Halve the initial times to make tests run faster
when there is no rerun.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 Apr 2020 22:00:05 +0200 |
parents | 9cbe3a4f1492 |
children | f27473034f26 |
comparison
equal
deleted
inserted
replaced
19953:313ad6f6fdb5 | 19954:c087099e9163 |
---|---|
1911 | 1911 |
1912 let buf = RunVimInTerminal('-S Xscript', {'rows': 6}) | 1912 let buf = RunVimInTerminal('-S Xscript', {'rows': 6}) |
1913 | 1913 |
1914 " Deep nesting of if ... endif | 1914 " Deep nesting of if ... endif |
1915 call term_sendkeys(buf, ":call Test1()\n") | 1915 call term_sendkeys(buf, ":call Test1()\n") |
1916 call term_wait(buf) | 1916 call TermWait(buf) |
1917 call WaitForAssert({-> assert_match('^E579:', term_getline(buf, 5))}) | 1917 call WaitForAssert({-> assert_match('^E579:', term_getline(buf, 5))}) |
1918 | 1918 |
1919 " Deep nesting of for ... endfor | 1919 " Deep nesting of for ... endfor |
1920 call term_sendkeys(buf, ":call Test2()\n") | 1920 call term_sendkeys(buf, ":call Test2()\n") |
1921 call term_wait(buf) | 1921 call TermWait(buf) |
1922 call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))}) | 1922 call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))}) |
1923 | 1923 |
1924 " Deep nesting of while ... endwhile | 1924 " Deep nesting of while ... endwhile |
1925 call term_sendkeys(buf, ":call Test3()\n") | 1925 call term_sendkeys(buf, ":call Test3()\n") |
1926 call term_wait(buf) | 1926 call TermWait(buf) |
1927 call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))}) | 1927 call WaitForAssert({-> assert_match('^E585:', term_getline(buf, 5))}) |
1928 | 1928 |
1929 " Deep nesting of try ... endtry | 1929 " Deep nesting of try ... endtry |
1930 call term_sendkeys(buf, ":call Test4()\n") | 1930 call term_sendkeys(buf, ":call Test4()\n") |
1931 call term_wait(buf) | 1931 call TermWait(buf) |
1932 call WaitForAssert({-> assert_match('^E601:', term_getline(buf, 5))}) | 1932 call WaitForAssert({-> assert_match('^E601:', term_getline(buf, 5))}) |
1933 | 1933 |
1934 " Deep nesting of function ... endfunction | 1934 " Deep nesting of function ... endfunction |
1935 call term_sendkeys(buf, ":call Test5()\n") | 1935 call term_sendkeys(buf, ":call Test5()\n") |
1936 call term_wait(buf) | 1936 call TermWait(buf) |
1937 call WaitForAssert({-> assert_match('^E1058:', term_getline(buf, 4))}) | 1937 call WaitForAssert({-> assert_match('^E1058:', term_getline(buf, 4))}) |
1938 call term_sendkeys(buf, "\<C-C>\n") | 1938 call term_sendkeys(buf, "\<C-C>\n") |
1939 call term_wait(buf) | 1939 call TermWait(buf) |
1940 | 1940 |
1941 "let l = '' | 1941 "let l = '' |
1942 "for i in range(1, 6) | 1942 "for i in range(1, 6) |
1943 " let l ..= term_getline(buf, i) . "\n" | 1943 " let l ..= term_getline(buf, i) . "\n" |
1944 "endfor | 1944 "endfor |