aboutsummaryrefslogtreecommitdiff
path: root/test/test.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-05-26 17:13:57 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2020-05-26 17:13:57 -0400
commita0e14a2f9e18e324f94b6577f5bae2990b882a9d (patch)
treedf82dbab26050984d61522adf725021789c9a19b /test/test.lua
parent04b425baccdcfb5f62510ba2924d2dcd5add922a (diff)
downloadtextadept-a0e14a2f9e18e324f94b6577f5bae2990b882a9d.tar.gz
textadept-a0e14a2f9e18e324f94b6577f5bae2990b882a9d.zip
Fixed undocumented regression with word completion and case sensitivity.
This feature was inadvertently removed during a refactor.
Diffstat (limited to 'test/test.lua')
-rw-r--r--test/test.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua
index ebdf5d74..6985bfc1 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -1818,6 +1818,15 @@ function test_editing_autocomplete_word()
buffer:auto_c_select('foob')
buffer:auto_c_complete()
assert_equal(buffer:get_text(), 'foo foobar foobar')
+ local ignore_case = buffer.auto_c_ignore_case
+ buffer.auto_c_ignore_case = false
+ buffer:add_text(' Bar b')
+ textadept.editing.autocomplete('word')
+ assert_equal(buffer:get_text(), 'foo foobar foobar Bar b')
+ buffer.auto_c_ignore_case = true
+ textadept.editing.autocomplete('word')
+ assert_equal(buffer:get_text(), 'foo foobar foobar Bar Bar')
+ buffer.auto_c_ignore_case = ignore_case
buffer.new()
buffer:add_text('foob')
textadept.editing.autocomplete_all_words = true