Repository: neovim/neovim
File: test/functional/ui/messages2_spec.lua (Lua)

Code before:
    })
    command('hi MsgArea guifg=Red guibg=Blue')
    command('hi Search guifg=Blue guibg=Red')
    command('set hlsearch shortmess+=s')
    feed('/foo<CR>')
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      {9:E486: Pattern not found: foo}{100:                         }|
    ]])
    command('set cmdheight=0 | echo "foo"')
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      {1:~                                                 }{4:foo}|
    ]])
    feed('g<lt>')
    screen:expect([[
                                                           |
      {1:~                                                    }|*11
      {3:                                                     }|
      {101:fo^o}{100:                                                  }|
    ]])
  end)

  it('echon append message', function()
    command([[echo 1 | echon 2]])
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      12                                                   |
    ]])
    feed('g<lt>')
    screen:expect([[
                                                           |
      {1:~                                                    }|*10
      {3:                                                     }|
      ^12                                                   |
                                                           |
    ]])
    feed([[q:echo 1 | echon 2 | echon 2 | echon 3<CR>]])
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      1223                                                 |
    ]])
    feed('g<lt>')
    screen:expect([[
                                                           |
      {1:~                                                    }|*10
      {3:                                                     }|

Review comment (suggestion):
```suggestion
  it(':echon appends message', function()
```

Code after:
    })
    command('hi MsgArea guifg=Red guibg=Blue')
    command('hi Search guifg=Blue guibg=Red')
    command('set hlsearch shortmess+=s')
    feed('/foo<CR>')
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      {9:E486: Pattern not found: foo}{100:                         }|
    ]])
    command('set cmdheight=0 | echo "foo"')
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      {1:~                                                 }{4:foo}|
    ]])
    feed('g<lt>')
    screen:expect([[
                                                           |
      {1:~                                                    }|*11
      {3:                                                     }|
      {101:fo^o}{100:                                                  }|
    ]])
  end)

  it(':echon appends message', function()
    command([[echo 1 | echon 2]])
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      12                                                   |
    ]])
    feed('g<lt>')
    screen:expect([[
                                                           |
      {1:~                                                    }|*10
      {3:                                                     }|
      ^12                                                   |
                                                           |
    ]])
    feed([[q:echo 1 | echon 2 | echon 2 | echon 3<CR>]])
    screen:expect([[
      ^                                                     |
      {1:~                                                    }|*12
      1223                                                 |
    ]])
    feed('g<lt>')
    screen:expect([[
                                                           |
      {1:~                                                    }|*10
      {3:                                                     }|