mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	test: avoid repeated screen lines in expected states
This is the command invoked repeatedly to make the changes:
    :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
			
			
This commit is contained in:
		@@ -133,9 +133,7 @@ describe('timers', function()
 | 
			
		||||
    screen:expect([[
 | 
			
		||||
      ^ITEM 1                                  |
 | 
			
		||||
      ITEM 2                                  |
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|*3
 | 
			
		||||
                                              |
 | 
			
		||||
    ]])
 | 
			
		||||
    nvim_async("command", "let g:cont = 1")
 | 
			
		||||
@@ -144,8 +142,7 @@ describe('timers', function()
 | 
			
		||||
      ^ITEM 1                                  |
 | 
			
		||||
      ITEM 2                                  |
 | 
			
		||||
      ITEM 3                                  |
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|*2
 | 
			
		||||
                                              |
 | 
			
		||||
    ]])
 | 
			
		||||
 | 
			
		||||
@@ -155,8 +152,7 @@ describe('timers', function()
 | 
			
		||||
      ^ITEM 1                                  |
 | 
			
		||||
      ITEM 2                                  |
 | 
			
		||||
      ITEM 3                                  |
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|
 | 
			
		||||
      {1:~                                       }|*2
 | 
			
		||||
                                              |
 | 
			
		||||
    ]], unchanged=true}
 | 
			
		||||
  end)
 | 
			
		||||
@@ -244,10 +240,7 @@ describe('timers', function()
 | 
			
		||||
    feed(":good")
 | 
			
		||||
    screen:expect([[
 | 
			
		||||
                                              |
 | 
			
		||||
      {0:~                                       }|
 | 
			
		||||
      {0:~                                       }|
 | 
			
		||||
      {0:~                                       }|
 | 
			
		||||
      {0:~                                       }|
 | 
			
		||||
      {0:~                                       }|*4
 | 
			
		||||
      :good^                                   |
 | 
			
		||||
    ]])
 | 
			
		||||
    command('let g:val = 1')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user