Skip to content

switch to use blackbox testing, move tests to separate module - #35

Draft
thaJeztah wants to merge 1 commit into
moby:mainfrom
thaJeztah:blackbox_testing
Draft

switch to use blackbox testing, move tests to separate module#35
thaJeztah wants to merge 1 commit into
moby:mainfrom
thaJeztah:blackbox_testing

Conversation

@thaJeztah

@thaJeztahthaJeztah commented Nov 5, 2022

Copy link
Copy Markdown
Member

@thaJeztah
thaJeztahforce-pushed the blackbox_testing branch 3 times, most recently from d2ad08c to d2f5e41CompareNovember 5, 2022 22:20
@thaJeztah
thaJeztah marked this pull request as ready for review December 5, 2022 13:07
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

Okay, moved this out of draft for consideration.

Comment threadtest/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}

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.typeWinsizestruct {
Heightuint16Widthuint16xuint16yuint16
}

And in golang.org/x/sys:

typeWinsizestruct {
Rowuint16Coluint16Xpixeluint16Ypixeluint16
}

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.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! I recall now; for Windows, it's a different type, so we can make it an alias (but only on !windows)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. nevermind; field names are different 🤦

@thaJeztah
thaJeztah marked this pull request as draft April 30, 2023 22:04
@thaJeztah
thaJeztahforce-pushed the blackbox_testing branch 2 times, most recently from a6a5c39 to 3e71216CompareMay 2, 2023 12:07
@thaJeztah
thaJeztahforce-pushed the blackbox_testing branch 2 times, most recently from c20e276 to ff86c79CompareJanuary 2, 2025 15:41
This allows us to remove the test-dependencies from the module itself
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@thaJeztah