diff options
| author | mitchell <unknown> | 2020-03-28 18:38:01 -0400 | 
|---|---|---|
| committer | mitchell <unknown> | 2020-03-28 18:38:01 -0400 | 
| commit | 7ffaae978a096dd2a922a0a7b227a02439753d43 (patch) | |
| tree | 3e8c28c673cb2591375c04cef9a3fd357c3e0705 /test/test_lexlua.lua | |
| parent | bd2dbf287be7144d4adc9b29a75f6e7c263e8ac4 (diff) | |
| download | scintilla-mirror-7ffaae978a096dd2a922a0a7b227a02439753d43.tar.gz | |
Switch to 1-based style numbers internally in Lua.
Diffstat (limited to 'test/test_lexlua.lua')
| -rw-r--r-- | test/test_lexlua.lua | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/test/test_lexlua.lua b/test/test_lexlua.lua index 3436d9d19..c692e0fb1 100644 --- a/test/test_lexlua.lua +++ b/test/test_lexlua.lua @@ -27,7 +27,7 @@ function assert_default_styles(lex)      local style = default_styles[i]      assert(lex._TOKENSTYLES[style],             string.format("style '%s' does not exist", style)) -    assert(lex._TOKENSTYLES[style] == i - 1, 'default styles out of order') +    assert(lex._TOKENSTYLES[style] == i, 'default styles out of order')    end    local predefined_styles = {      'default', 'linenumber', 'bracelight', 'bracebad', 'controlchar', @@ -37,7 +37,7 @@ function assert_default_styles(lex)      local style = predefined_styles[i]      assert(lex._TOKENSTYLES[style],             string.format("style '%s' does not exist", style)) -    assert(lex._TOKENSTYLES[style] == i + 31, 'predefined styles out of order') +    assert(lex._TOKENSTYLES[style] == i + 32, 'predefined styles out of order')    end  end @@ -573,8 +573,8 @@ function test_legacy()      'indentguide', 'calltip', 'folddisplaytext'    }    local token_styles = {} -  for i = 1, #default do token_styles[default[i]] = i - 1 end -  for i = 1, #predefined do token_styles[predefined[i]] = i + 31 end +  for i = 1, #default do token_styles[default[i]] = i end +  for i = 1, #predefined do token_styles[predefined[i]] = i + 32 end    lex._TOKENSTYLES, lex._numstyles = token_styles, #default    lex._EXTRASTYLES = {}    assert_default_styles(lex) | 
