diff options
author | 2021-10-01 16:11:48 -0400 | |
---|---|---|
committer | 2021-10-01 16:11:48 -0400 | |
commit | 91f18298fb33acfbbf9c26bef71bd940ffccba80 (patch) | |
tree | fcfe96ab3f5443b1ac9ec87925bce14451cb0e5f /test | |
parent | 45bdbe2d13e5840c25dfadc27b49288ba486e729 (diff) |
Fixed uncommenting comments that are not initially aligned.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua index 6356ee1c..9767eaa8 100644 --- a/test/test.lua +++ b/test/test.lua @@ -1788,6 +1788,28 @@ function test_editing_toggle_comment_lines() buffer:undo() -- comment buffer:undo() -- uncomment assert_equal(buffer:get_text(), text) -- verify atomic undo + -- LuaFormatter off + buffer:set_text(table.concat({ + '--foo', + ' --foo' + }, '\n')) + -- LuaFormatter on + offset = 2 + buffer:select_all() + textadept.editing.toggle_comment() + -- LuaFormatter off + assert_equal(buffer:get_text(), table.concat({ + 'foo', + ' foo' + }, '\n')) + -- LuaFormatter on + textadept.editing.toggle_comment() + -- LuaFormatter off + assert_equal(buffer:get_text(), table.concat({ + '--foo', + '-- foo' + }, '\n')) + -- LuaFormatter on buffer:close(true) end |