diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2015-07-23 21:07:51 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2015-07-23 22:35:42 +0200 |
commit | 7a6bf3f418c5ad94ac2ac71f21275a87d08e87b9 (patch) | |
tree | 88faf7f2e273c489d79915a0327af6d079a37b17 /test/functional/ui/screen_basic_spec.lua | |
parent | a39ce92f0be2eb2470aecd7e8d7ed4f9b9510fce (diff) | |
download | rneovim-7a6bf3f418c5ad94ac2ac71f21275a87d08e87b9.tar.gz rneovim-7a6bf3f418c5ad94ac2ac71f21275a87d08e87b9.tar.bz2 rneovim-7a6bf3f418c5ad94ac2ac71f21275a87d08e87b9.zip |
Add ui test for default title (with/without filename) #3091
Diffstat (limited to 'test/functional/ui/screen_basic_spec.lua')
-rw-r--r-- | test/functional/ui/screen_basic_spec.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 472c211ab7..421c167300 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -63,6 +63,29 @@ describe('Screen', function() end end) end) + + it('has correct default title with unnamed file', function() + local expected = '[No Name] - NVIM' + execute('set title') + screen:wait(function() + local actual = screen.title + if actual ~= expected then + return 'Expected title to be "'..expected..'" but was "'..actual..'"' + end + end) + end) + + it('has correct default title with named file', function() + local expected = 'myfile (/mydir) - NVIM' + execute('set title') + execute('file /mydir/myfile') + screen:wait(function() + local actual = screen.title + if actual ~= expected then + return 'Expected title to be "'..expected..'" but was "'..actual..'"' + end + end) + end) end) describe(':set icon', function() |