arl.gitmux/config_test.go
Aurélien Rainone 1606e240f4
Issue 77/count insertions deletions (#83)
* tmux: cosmetics

* bump gitstatus to v0.6.0

* testscript: set TestWork to true

* Add Insertions/Deletions to Symbols and Styles

* Show insertions/deletions if 'stats' is in the layout

* Add Test_stats

* Update README.md
2023-02-15 23:27:15 +01:00

36 lines
695 B
Go

//go:build !windows
// +build !windows
package main
import (
"flag"
"os"
"testing"
"github.com/rogpeppe/go-internal/gotooltest"
"github.com/rogpeppe/go-internal/testscript"
)
var updateGolden = flag.Bool("update", false, "update golden files")
func TestScripts(t *testing.T) {
wd, err := os.Getwd()
if err != nil {
t.Fatalf("GetWd error: %v", err)
}
params := testscript.Params{
Dir: "testdata",
Setup: func(env *testscript.Env) error {
env.Setenv("GITMUX_DIR", wd)
return nil
},
UpdateScripts: *updateGolden,
TestWork: true,
}
if err := gotooltest.Setup(&params); err != nil {
t.Errorf("gotooltest.Setup error: %v", err)
}
testscript.Run(t, params)
}