switch to use blackbox testing, move tests to separate module#35
Draft
switch to use blackbox testing, move tests to separate module#35
Conversation
d2ad08c to
d2f5e41
Compare
d2f5e41 to
6523db6
Compare
2 tasks
6523db6 to
a5b1cb2
Compare
Member
Author
|
Okay, moved this out of draft for consideration. |
thaJeztah
commented
Dec 5, 2022
test/term_test.go
Outdated
Comment on lines
50
to
51
| newSize := Winsize{Width: 200, Height: 200, x: winSize.x, y: winSize.y} | ||
| newSize := Winsize{Width: 200, Height: 200} |
Member
Author
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.
Member
Author
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)
Member
Author
There was a problem hiding this comment.
Hm.. nevermind; field names are different 🤦
a6a5c39 to
3e71216
Compare
3e71216 to
c20e276
Compare
This allows us to remove the test-dependencies from the module itself Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
c20e276 to
ff86c79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows us to remove the test-dependencies from the module itself.