Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lint2
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jun 9, 2023
2 parents 898cfa2 + b2d2ac6 commit c0f924b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.golden -text
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:
run: go build -v ./...
working-directory: ./examples

- name: Test examples
run: go test -v ./...
working-directory: ./examples

- name: Build tutorials
run: go build -v ./...
working-directory: ./tutorials
6 changes: 6 additions & 0 deletions examples/simple/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ import (
"time"

tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/x/exp/teatest"
"github.com/muesli/termenv"
)

func init() {
lipgloss.SetColorProfile(termenv.Ascii)
}

func TestApp(t *testing.T) {
m := model(10)
tm := teatest.NewTestModel(
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/testdata/TestApp.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[?25lHi. This program will exit in 10 seconds. To quit sooner press any key
Hi. This program will exit in 9 seconds. To quit sooner press any key.
[?25lHi. This program will exit in 10 seconds. To quit sooner press any key
Hi. This program will exit in 9 seconds. To quit sooner press any key.
[?25h[?1002l[?1003l

0 comments on commit c0f924b

Please sign in to comment.