1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-27 13:48:49 +08:00

Merge pull request #236 from mum4k/release-0-12-1

Release v0.12.1
This commit is contained in:
Jakub Sobon 2020-06-20 15:31:00 -04:00 committed by GitHub
commit 954b43c8d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 12 deletions

View File

@ -13,8 +13,6 @@ script:
- diff -u <(echo -n) <(gofmt -d -s .)
- diff -u <(echo -n) <(./internal/scripts/autogen_licences.sh .)
- diff -u <(echo -n) <(golint ./...)
after_success:
- ./internal/scripts/coverage.sh
env:
global:
- CGO_ENABLED=0
- CGO_ENABLED=0

View File

@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.12.1] - 20-Jun-2020
### Fixed
- the `tcell` unit test can now pass in headless mode (when TERM="") which
happens under bazel.
- switching coveralls integration to Github application.
## [0.12.0] - 10-Apr-2020
### Added
@ -325,7 +333,8 @@ identifiers shouldn't be used externally.
- The Gauge widget.
- The Text widget.
[unreleased]: https://github.com/mum4k/termdash/compare/v0.12.0...devel
[unreleased]: https://github.com/mum4k/termdash/compare/v0.12.1...devel
[0.12.1]: https://github.com/mum4k/termdash/compare/v0.12.0...v0.12.1
[0.12.0]: https://github.com/mum4k/termdash/compare/v0.11.0...v0.12.0
[0.11.0]: https://github.com/mum4k/termdash/compare/v0.10.0...v0.11.0
[0.10.0]: https://github.com/mum4k/termdash/compare/v0.9.1...v0.10.0

View File

@ -1,6 +0,0 @@
#!/bin/bash
go get github.com/go-playground/overalls && go get github.com/mattn/goveralls
overalls -project=github.com/mum4k/termdash -covermode=count
goveralls -coverprofile=overalls.coverprofile -service travis-ci

View File

@ -16,6 +16,7 @@ package tcell
import (
"context"
"fmt"
"image"
"github.com/gdamore/tcell"
@ -79,11 +80,14 @@ type Terminal struct {
clearStyle *cell.Options
}
// tcellNewScreen can be overridden from tests.
var tcellNewScreen = tcell.NewScreen
// newTerminal creates the terminal and applies the options.
func newTerminal(opts ...Option) (*Terminal, error) {
screen, err := tcell.NewScreen()
screen, err := tcellNewScreen()
if err != nil {
return nil, err
return nil, fmt.Errorf("tcell.NewScreen => %v", err)
}
t := &Terminal{

View File

@ -17,6 +17,7 @@ package tcell
import (
"testing"
"github.com/gdamore/tcell"
"github.com/kylelemons/godebug/pretty"
"github.com/mum4k/termdash/cell"
"github.com/mum4k/termdash/terminal/terminalapi"
@ -45,11 +46,13 @@ func TestNewTerminalColorMode(t *testing.T) {
},
}
tcellNewScreen = func() (tcell.Screen, error) { return nil, nil }
for _, tc := range tests {
t.Run(tc.desc, func(t *testing.T) {
got, err := newTerminal(tc.opts...)
if err != nil {
t.Errorf("newTerminal => unexpected error:\n%v", err)
return
}
// Ignore these fields.
@ -96,11 +99,13 @@ func TestNewTerminalClearStyle(t *testing.T) {
},
}
tcellNewScreen = func() (tcell.Screen, error) { return nil, nil }
for _, tc := range tests {
t.Run(tc.desc, func(t *testing.T) {
got, err := newTerminal(tc.opts...)
if err != nil {
t.Errorf("newTerminal => unexpected error:\n%v", err)
return
}
// Ignore these fields.