mirror of https://github.com/japl-lang/jale.git
results of first testing
This commit is contained in:
parent
12c7c28714
commit
3705151b70
|
@ -8,4 +8,4 @@ srcDir = "src"
|
|||
|
||||
# Dependencies
|
||||
|
||||
requires "nim >= 1.4.2"
|
||||
requires "nim >= 1.0.0"
|
||||
|
|
88
platforms.md
88
platforms.md
|
@ -1,34 +1,78 @@
|
|||
This short document describes the testing strategy and status for jale.
|
||||
Jale should be tested on different active versions of different
|
||||
terminal emulators. Also on different OSes. This document describes which
|
||||
platforms are being/planned on being tested and a testing procedure.
|
||||
|
||||
Note: this is a wip document, await updates once the bug hunt starts
|
||||
|
||||
# Platforms
|
||||
|
||||
Unless otherwise specified, everything falls back to Arch linux, x86_64, nim 1.4.2.
|
||||
Reading vt100 docs/relying on nim's terminal is not enough, it's best to
|
||||
test everything out there. Different terminal emulators, a few different OS'es
|
||||
or distros and also windows specific emulators.
|
||||
|
||||
Unless otherwise specified, everything falls back to Artix linux (basically the same versions of software as arch), x86_64, nim 1.4.2.
|
||||
|
||||
| Terminal | Last tested and worked |
|
||||
| :-------- | :------------ |
|
||||
| gnome terminal | never |
|
||||
| xfce terminal | passed on 16.2.2021 |
|
||||
| lxterminal | never |
|
||||
| konsole | never |
|
||||
| alacritty | never |
|
||||
| xterm | never |
|
||||
| urxvt | never |
|
||||
| cmd.exe | never |
|
||||
| powershell | never |
|
||||
| windows terminal | never |
|
||||
| gnome terminal + ssh | never |
|
||||
| gnome terminal + tmux | never |
|
||||
| Terminal | Last tested and worked |
|
||||
| :-------- | :------------ |
|
||||
| xfce terminal | passed on 19.2.2021 |
|
||||
| konsole | passed on 19.2.2021 |
|
||||
| alacritty | passed on 19.2.2021 |
|
||||
| xterm | passed on 19.2.2021 |
|
||||
| urxvt | failed on 19.2.2021 (probably not vt100 comp) |
|
||||
| cmd.exe | never |
|
||||
| powershell | never |
|
||||
| windows terminal | never |
|
||||
| cygwin | never |
|
||||
| termux/android | never |
|
||||
| xfce terminal + ssh | passed on 19.2.2021 |
|
||||
| xfce terminal + tmux | failed on 19.2.2021 |
|
||||
| tty | ? on 19.2.2021 (see notes) |
|
||||
| freebsd tty | ? on 19.2.2021 (see notes) |
|
||||
| freebsd xterm | passed on 19.2.2021 |
|
||||
| freebsd xfce term | passed on 19.2.2021 |
|
||||
| debian xterm | passed on 19.2.2021 |
|
||||
| debian qterminal | passed on 19.2.2021 |
|
||||
| debian kitty | passed on 19.2.2021 |
|
||||
| nim 1.0.0 | failed to compile on 19.2.2021 |
|
||||
|
||||
Info about testing dates:
|
||||
|
||||
| Testing date | commit |
|
||||
| 19.2.2021 | 12c7c28714508e7a1c16bcd7b3fa1372c4a19ae2 |
|
||||
|
||||
## Notes (open in a text editor to see this section well)
|
||||
|
||||
urxvt: Ctrl+down outputted a "b", so most likely different escape sequence (not the usual vt100).
|
||||
The following sequences are in out of the box urxvt:
|
||||
ctrl up: 27, 79, 97
|
||||
ctrl down: 27, 79, 98
|
||||
ctrl left: 27, 79, 100
|
||||
ctrl right: 27, 79, 99
|
||||
ctrl pgup: 27, 91, 53, 94
|
||||
ctrl pgdn: 27, 91, 54, 94
|
||||
ctrl home: 27, 91, 55, 94
|
||||
ctrl end: 27, 91, 56, 94
|
||||
home: 27, 91, 55, 126
|
||||
end: 27, 91, 56, 126
|
||||
already should be fixed, will update at next testing date
|
||||
|
||||
tmux, the following input differs:
|
||||
end: 27, 91, 52, 126
|
||||
home: 27, 91, 49, 126
|
||||
(ctrl versions fine)
|
||||
|
||||
tty:
|
||||
ctrl makes no difference on arrow keys
|
||||
home: 27, 91, 49, 126
|
||||
end: 27, 91, 52, 126
|
||||
home/end already should be fixed, will update at next testing date
|
||||
|
||||
freebsd tty:
|
||||
ctrl makes no difference on arrow keys
|
||||
|
||||
nim 1.0.0:
|
||||
already should be fixed, will update at next testing date
|
||||
|
||||
# Testing procedure
|
||||
|
||||
examples/interactive_basic
|
||||
Platform
|
||||
- [ ] Jale compiles?
|
||||
examples/interactive_basic
|
||||
- [ ] Entering single line input, backspace, delete
|
||||
- [ ] entering new lines, deleting lines with backspace
|
||||
- [ ] home/end/page up/page down
|
||||
|
|
|
@ -78,16 +78,8 @@ proc render(editor: LineEditor, wr: var TermWriter, line: int = -1, hscroll: boo
|
|||
if y == -1:
|
||||
y = editor.content.Y
|
||||
|
||||
wr.renderLine(
|
||||
(
|
||||
if y == 0:
|
||||
editor.prompt
|
||||
else:
|
||||
" ".repeat(editor.prompt.len())
|
||||
),
|
||||
editor.content.getLine(y),
|
||||
0
|
||||
)
|
||||
let prompt = if y == 0: editor.prompt else: " ".repeat(editor.prompt.len())
|
||||
wr.renderLine(prompt, editor.content.getLine(y), 0)
|
||||
|
||||
proc fullRender(editor: LineEditor, wr: var TermWriter) =
|
||||
# from the top cursor pos, it draws the entire multiline prompt, then
|
||||
|
|
|
@ -53,6 +53,8 @@ proc defEscSeq(keys: seq[int], id: JaleKeycode) =
|
|||
for key in keys:
|
||||
result *= 256
|
||||
result += key
|
||||
if escapeSeqs.hasKey(result):
|
||||
raise newException(Defect, "Duplicate escape sequence definition")
|
||||
escapeSeqs[result] = id
|
||||
|
||||
block:
|
||||
|
@ -94,7 +96,7 @@ block:
|
|||
defEscSeq(@[27, 91, 67], jkRight)
|
||||
defEscSeq(@[27, 91, 68], jkLeft)
|
||||
|
||||
# shift+arrow keys
|
||||
# ctrl+arrow keys
|
||||
defEscSeq(@[27, 91, 49], jkContinue)
|
||||
defEscSeq(@[27, 91, 49, 59], jkContinue)
|
||||
defEscSeq(@[27, 91, 49, 59, 53], jkContinue) # ctrl
|
||||
|
@ -106,6 +108,13 @@ block:
|
|||
defEscSeq(@[27, 91, 49, 59, 53, 67], jkCtrlRight) # ctrl
|
||||
defEscSeq(@[27, 91, 49, 59, 53, 68], jkCtrlLeft) # ctrl
|
||||
|
||||
# urxvt
|
||||
defEscSeq(@[27, 79], jkContinue)
|
||||
defEscSeq(@[27, 79, 97], jkCtrlUp)
|
||||
defEscSeq(@[27, 79, 98], jkCtrlDown)
|
||||
defEscSeq(@[27, 79, 99], jkCtrlRight)
|
||||
defEscSeq(@[27, 79, 100], jkCtrlLeft)
|
||||
|
||||
# other 4 move keys
|
||||
defEscSeq(@[27, 91, 72], jkHome)
|
||||
defEscSeq(@[27, 91, 70], jkEnd)
|
||||
|
@ -113,8 +122,17 @@ block:
|
|||
defEscSeq(@[27, 91, 53], jkContinue)
|
||||
defEscSeq(@[27, 91, 53, 126], jkPageUp)
|
||||
defEscSeq(@[27, 91, 54, 126], jkPageDown)
|
||||
# alternative home/end for tty
|
||||
defEscSeq(@[27, 91, 49, 126], jkHome)
|
||||
defEscSeq(@[27, 91, 52], jkContinue)
|
||||
defEscSeq(@[27, 91, 52, 126], jkEnd)
|
||||
# urxvt
|
||||
defEscSeq(@[27, 91, 55], jkContinue)
|
||||
defEscSeq(@[27, 91, 56], jkContinue)
|
||||
defEscSeq(@[27, 91, 55, 126], jkHome)
|
||||
defEscSeq(@[27, 91, 56, 126], jkEnd)
|
||||
|
||||
# ctrl + fancy keys like pgup, pgdown
|
||||
# ctrl + fancy keys like pgup, pgdown, home, end
|
||||
defEscSeq(@[27, 91, 53, 59], jkContinue)
|
||||
defEscSeq(@[27, 91, 53, 59, 53], jkContinue)
|
||||
defEscSeq(@[27, 91, 53, 59, 53, 126], jkCtrlPageUp)
|
||||
|
@ -122,10 +140,15 @@ block:
|
|||
defEscSeq(@[27, 91, 54, 59, 53], jkContinue)
|
||||
defEscSeq(@[27, 91, 54, 59, 53, 126], jkCtrlPageDown)
|
||||
|
||||
# ctrl+ home, end
|
||||
defEscSeq(@[27, 91, 49, 59, 53, 72], jkCtrlHome)
|
||||
defEscSeq(@[27, 91, 49, 59, 53, 70], jkCtrlEnd)
|
||||
|
||||
# urxvt
|
||||
defEscSeq(@[27, 91, 53, 94], jkCtrlPageUp)
|
||||
defEscSeq(@[27, 91, 54, 94], jkCtrlPageDown)
|
||||
defEscSeq(@[27, 91, 55, 94], jkCtrlHome)
|
||||
defEscSeq(@[27, 91, 56, 94], jkCtrlEnd)
|
||||
|
||||
# other keys
|
||||
defEscSeq(@[27, 91, 51], jkContinue)
|
||||
defEscSeq(@[27, 91, 50], jkContinue)
|
||||
|
|
Loading…
Reference in New Issue