File: test_completion.lua

package info (click to toggle)
luakit 1%3A2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,844 kB
  • sloc: ansic: 12,519; makefile: 140; ruby: 79; sh: 48
file content (30 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- Tests for the input completions module.
--
-- @copyright 2017 Aidan Holm <aidanholm@gmail.com>

local T = {}
local assert = require("luassert")

uris = {"about:blank"}
require "config.rc"

local window = require "window"
local w = assert(select(2, next(window.bywidget)))

T.test_leaving_completion_restores_correct_input_text = function ()
    local input = w.ibar.input

    w:enter_cmd(":tab")
    w:set_mode("completion")
    w.menu:move_up()
    assert.equal(":tab", input.text)

    input.text = ":adbl"
    w.menu:move_down()
    w.menu:move_up()
    assert.equal(":adbl", input.text)
end

return T

-- vim: et:sw=4:ts=8:sts=4:tw=80