mirror of
https://github.com/arl/gitmux.git
synced 2026-09-10 07:26:18 -04:00
* 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
36 lines
695 B
Go
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(¶ms); err != nil {
|
|
t.Errorf("gotooltest.Setup error: %v", err)
|
|
}
|
|
testscript.Run(t, params)
|
|
}
|