Repository navigation
Conversation
d2ad08c to
d2f5e41
Compare
d2f5e41 to
6523db6
Compare
6523db6 to
a5b1cb2
Compare
|
Okay, moved this out of draft for consideration. |
| newSize := Winsize{Width: 200, Height: 200, x: winSize.x, y: winSize.y} | ||
| newSize := Winsize{Width: 200, Height: 200} |
There was a problem hiding this comment.
Ah, I think this was the bit I was still looking at. It's somewhat unclear why x and y aren't exported; effectively WinSize in this module is identical to golang.org/x/sys/unix.Winsize`;
Type in this module:
// Winsize represents the size of the terminal window.
type Winsize struct {
Height uint16
Width uint16
x uint16
y uint16
}And in golang.org/x/sys:
type Winsize struct {
Row uint16
Col uint16
Xpixel uint16
Ypixel uint16
}In this module, we're converting the types between, so perhaps instead we should make it an alias (and deprecate the local type). Let me look at that.
There was a problem hiding this comment.
Oh! I recall now; for Windows, it's a different type, so we can make it an alias (but only on !windows)
There was a problem hiding this comment.
Hm.. nevermind; field names are different 🤦
a6a5c39 to
3e71216
Compare
c20e276 to
ff86c79
Compare
ff86c79 to
6a9517e
Compare
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
6a9517e to
b41d1ee
Compare
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in this test-only refactor; tests were not executed.
No open issues 🎉
What changed in this PR
This test-only refactor moves the ASCII and escape-proxy tests to the external term_test package and simplifies existing test code without changing production behavior.
Changes:
- Rewrites
TestEscapeProxyReadas a table-driven test while retaining existing scenarios. - Uses exported APIs in the ASCII and escape-proxy tests.
- Simplifies Unix test cleanup and removes reliance on private window-size fields.
| File | Description |
|---|---|
term_unix_test.go |
Simplifies cleanup and window-size initialization. |
proxy_test.go |
Converts escape-proxy tests to table-driven black-box tests. |
ascii_test.go |
Tests ToBytes through the exported package API. |
Review effort: Balanced
Uh oh!
There was an error while loading. Please reload this page.