aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <none@none>2021-09-30 16:33:10 -0400
committerGravatar mitchell <none@none>2021-09-30 16:33:10 -0400
commitc01de90dfc7a48d7687117000dfc3252d9de0370 (patch)
tree3c0fab0b54bf7172fc80232e87f0bbcccdf04745
parent039e12dc1051388fb852ee496adf016380cfd38d (diff)
Updating some test data to reflect local environment changes.
After an OS upgrade, some /etc file permissions have changed, and spellcheck seems to have added 'foo'.
-rw-r--r--test/test.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test.lua b/test/test.lua
index 54419eb9..6356ee1c 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -336,8 +336,8 @@ end
function test_file_io_open_file_errors()
if LINUX then
- assert_raises(function() io.open_file('/etc/group-') end,
- 'cannot open /etc/group-: Permission denied')
+ assert_raises(function() io.open_file('/etc/gshadow-') end,
+ 'cannot open /etc/gshadow-: Permission denied')
end
-- TODO: find a case where the file can be opened, but not read
end
@@ -4734,7 +4734,7 @@ function test_spellcheck()
local spellcheck = require('spellcheck')
local SPELLING_ID = 1 -- not accessible
buffer:new()
- buffer:add_text('-- foo bar\nbaz = "quux"')
+ buffer:add_text('-- foose bar\nbaz = "quux"')
-- Test background highlighting.
spellcheck.check_spelling()
@@ -4749,19 +4749,19 @@ function test_spellcheck()
end
return misspellings
end
- assert_equal(get_misspellings(), {'foo', 'baz', 'quux'})
+ assert_equal(get_misspellings(), {'foose', 'baz', 'quux'})
buffer:set_lexer('lua')
spellcheck.check_spelling()
- assert_equal(get_misspellings(), {'foo', 'quux'})
+ assert_equal(get_misspellings(), {'foose', 'quux'})
-- Test interactive parts.
spellcheck.check_spelling(true)
assert(buffer:auto_c_active(), 'no misspellings')
local s, e = buffer.current_pos, buffer:word_end_position(buffer.current_pos)
- assert_equal(buffer:text_range(s, e), 'foo')
+ assert_equal(buffer:text_range(s, e), 'foose')
buffer:cancel()
- events.emit(events.USER_LIST_SELECTION, SPELLING_ID, 'goo', s)
- assert_equal(buffer:text_range(s, e), 'goo')
+ events.emit(events.USER_LIST_SELECTION, SPELLING_ID, 'goose', s)
+ assert_equal(buffer:text_range(s, e), 'goose')
ui.update()
if CURSES then spellcheck.check_spelling() end -- not needed when interactive
spellcheck.check_spelling(true)