Check for correct ordering of completed items

The correct and consistent ordering is lexicographic. Not mtime, not
ctime, but pure lexicographic ordering.
This commit is contained in:
Florian Gamböck 2017-07-15 17:39:30 +02:00
parent 7ab57e1953
commit da987582a6
1 changed files with 14 additions and 0 deletions

View File

@ -206,6 +206,20 @@ describe("awful.completion.shell", function()
end) end)
end end
--]] --]]
if has_bash then
it("correctly sorts completed items (bash)", function()
assert.same(shell('./ambi', 7, 1, 'bash'), {'./ambiguous_dir_a/', 19,
{'./ambiguous_dir_a/', './ambiguous_dir_b/', './ambiguous_dir_c/',
'./ambiguous_dir_d/', './ambiguous_dir_e/', './ambiguous_dir_f/'}})
end)
end
if has_zsh then
it("correctly sorts completed items (zsh)", function()
assert.same(shell('./ambi', 7, 1, 'zsh'), {'./ambiguous_dir_c/', 19,
{'./ambiguous_dir_c/', './ambiguous_dir_e/'}})
end)
end
end) end)
describe("awful.completion.shell handles $SHELL", function() describe("awful.completion.shell handles $SHELL", function()