aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-22 12:32:14 -0400
committermitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-22 12:32:14 -0400
commit57871e1b1f05ee2d87c07ed6e1bcb86d753f6a43 (patch)
tree3215d10cb2a039c85b18a9dd349efd7579248d75 /test
parent6b82a6288fe1775f63894882ba9b1a9727780b45 (diff)
downloadtextadept-57871e1b1f05ee2d87c07ed6e1bcb86d753f6a43.tar.gz
textadept-57871e1b1f05ee2d87c07ed6e1bcb86d753f6a43.zip
`textadept.editing.strip_trailing_spaces` should not apply to binary files.
Diffstat (limited to 'test')
-rw-r--r--test/test.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua
index 047f6601..ee4cbd0f 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -1481,6 +1481,9 @@ function test_editing_strip_trailing_spaces()
assert_equal(buffer.current_pos, buffer.line_end_position[2])
buffer:undo()
assert_equal(buffer:get_text(), text)
+ buffer.encoding = nil -- treat as a binary file
+ events.emit(events.FILE_BEFORE_SAVE)
+ assert_equal(buffer:get_text(), text)
buffer:close(true)
textadept.editing.strip_trailing_spaces = strip -- restore
end