mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
Some checks failed
build / windows (push) Has been cancelled
build / other_os (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / linux (push) Has been cancelled
build / go1.24 (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / lint (push) Has been cancelled
build / android-all (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/386 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/amd64 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v6 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm/v7 (push) Has been cancelled
Build & Push Docker Images / Build Docker Image for linux/arm64 (push) Has been cancelled
Build & Push Docker Images / Merge & Push Final Docker Image (push) Has been cancelled
35 lines
799 B
Go
35 lines
799 B
Go
//go:build !plan9
|
|
|
|
package logger_test
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/rclone/rclone/fs/logger"
|
|
"github.com/rogpeppe/go-internal/testscript"
|
|
)
|
|
|
|
// TestMain drives the tests
|
|
func TestMain(m *testing.M) {
|
|
// This enables the testscript package. See:
|
|
// https://bitfieldconsulting.com/golang/cli-testing
|
|
// https://pkg.go.dev/github.com/rogpeppe/go-internal@v1.11.0/testscript
|
|
testscript.Main(m, map[string]func(){
|
|
"rclone": logger.Main,
|
|
})
|
|
}
|
|
|
|
func TestLogger(t *testing.T) {
|
|
// Usage: https://bitfieldconsulting.com/golang/cli-testing
|
|
|
|
testscript.Run(t, testscript.Params{
|
|
Dir: "testdata/script",
|
|
Setup: func(env *testscript.Env) error {
|
|
env.Setenv("SRC", filepath.Join("$WORK", "src"))
|
|
env.Setenv("DST", filepath.Join("$WORK", "dst"))
|
|
return nil
|
|
},
|
|
})
|
|
}
|