Logo
Explore Help
Sign In
iSharkFly-Docs/packer-cn
1
0
Fork 0
You've already forked packer-cn
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
packer-cn/common/terminal_test.go

10 lines
198 B
Go
Raw Normal View History

Moved the progress bar out of packer.Ui and unlinked it out of all the packer.Ui implementations. Split up the terminal-related functions into a separate terminal.go and calculate the progress bar width by traversing through packer.Ui to avoid the issue with github.com/ugorji/go/codec serializing private members (or unsafe pointers) of structs. Shuffled some arguments around in getConsoleScreenBufferInfo in common/terminal_windows.go so that the interface forces the user to correctly declare a _CONSOLE_SCREEN_BUFFER_INFO type.
2018-08-18 23:06:14 -05:00
package common
import "testing"
func TestGetTerminalDimensions(t *testing.T) {
if _, _, err := GetTerminalDimensions(); err != nil {
t.Fatalf("Unable to get terminal dimensions: %s", err)
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 87ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API