diff options
author | 2020-07-13 15:22:04 -0400 | |
---|---|---|
committer | 2020-07-13 15:22:04 -0400 | |
commit | 4860332233bb7ca7b635a0c9922546af559aa647 (patch) | |
tree | 403875878df404310cb32278fb519e0c772796cf /test | |
parent | 5e2d3b835867311aafd8a8e89dc227c0a92cedab (diff) | |
download | textadept-4860332233bb7ca7b635a0c9922546af559aa647.tar.gz textadept-4860332233bb7ca7b635a0c9922546af559aa647.zip |
Test setting styles directly via `lexer.styles`.
Requires latest Scintilla for proper `lexer.colors` return types.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua index 3831fcfb..1ae3be7c 100644 --- a/test/test.lua +++ b/test/test.lua @@ -3097,6 +3097,9 @@ function test_set_lexer_style() assert(view.style_fore[style] ~= default_fore, 'function name style_fore same as default style_fore') view.style_fore[style] = view.style_fore[view.STYLE_DEFAULT] assert_equal(view.style_fore[style], default_fore) + assert(lexer.colors.orange > 0 and lexer.colors.orange ~= default_fore) + lexer.styles['function'] = {fore = lexer.colors.orange} + assert_equal(view.style_fore[style], lexer.colors.orange) buffer:close(true) -- Defined in Lua lexer, which is not currently loaded. assert(buffer:style_of_name('library'), view.STYLE_DEFAULT) |