aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com>2017-05-29 07:51:06 +0100
committerJonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com>2017-06-03 18:53:28 +0100
commit1c1231bf139943382df6cec9221f84708d4aea64 (patch)
treea589f4e964d734eeb0b8bc354995bdaba2615f35 /test
parent32396b5879b429def1c48948069c55366d41b9be (diff)
downloadrneovim-1c1231bf139943382df6cec9221f84708d4aea64.tar.gz
rneovim-1c1231bf139943382df6cec9221f84708d4aea64.tar.bz2
rneovim-1c1231bf139943382df6cec9221f84708d4aea64.zip
tui: Add built-in terminfo entry for VTE.
Also slightly refactor the way in which GNOME/MATE Terminal pretending to be xterm is detected.
Diffstat (limited to 'test')
-rw-r--r--test/functional/terminal/tui_spec.lua39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 225a1fc170..d27e93c9f9 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -514,6 +514,45 @@ describe("tui 't_Co' (terminal colors)", function()
assert_term_colors("st-256color", nil, 256)
end)
+ -- gnome and vte:
+ --
+ -- FreeBSD and MacOS fall back to the built-in vte-256color entry.
+ -- Linux has a gnome, a vte, a gnome-256color, and a vte-256color entry in
+ -- external terminfo with 8, 8, 256, and 256 colours respectively, which are
+ -- raised to 256.
+
+ it("TERM=gnome no COLORTERM uses 256 colors", function()
+ assert_term_colors("gnome", nil, 256)
+ end)
+
+ it("TERM=gnome COLORTERM=gnome uses 256 colors", function()
+ assert_term_colors("gnome", "gnome", 256)
+ end)
+
+ it("TERM=gnome COLORTERM=gnome-256color uses 256 colors", function()
+ assert_term_colors("gnome", "gnome-256color", 256)
+ end)
+
+ it("TERM=gnome-256color uses 256 colors", function()
+ assert_term_colors("gnome-256color", nil, 256)
+ end)
+
+ it("TERM=vte no COLORTERM uses 256 colors", function()
+ assert_term_colors("vte", nil, 256)
+ end)
+
+ it("TERM=vte COLORTERM=vte uses 256 colors", function()
+ assert_term_colors("vte", "vte", 256)
+ end)
+
+ it("TERM=vte COLORTERM=vte-256color uses 256 colors", function()
+ assert_term_colors("vte", "vte-256color", 256)
+ end)
+
+ it("TERM=vte-256color uses 256 colors", function()
+ assert_term_colors("vte-256color", nil, 256)
+ end)
+
-- others:
it("TERM=interix uses 8 colors", function()