flamenco/internal/find_blender/windows_test.go
Sybren A. Stüvel aec5ee49e0 First-Time Wizard: allow selecting Blender executables
The wizard now finds Blender in various ways, and lets the user select
which one to use.

Doesn't save anything yet, though.
2022-07-14 12:22:56 +02:00

33 lines
744 B
Go

//go:build windows
package find_blender
// SPDX-License-Identifier: GPL-3.0-or-later
import (
"flag"
"testing"
"github.com/stretchr/testify/assert"
)
// TestFileAssociation is a "weak" test, which actually accepts both happy and unhappy flows.
// It would be too fragile to always require a file association to be set up with Blender.
func TestFileAssociation(t *testing.T) {
exe, err := fileAssociation()
if err != nil {
assert.Empty(t, exe)
if *withBlender {
t.Fatalf("unexpected error: %v", err)
} else {
t.Skip("skipping test, -withBlender arg not passed")
}
return
}
assert.NotEmpty(t, exe)
assert.NotContains(t, exe,
"blender-launcher",
"FindBlender should find blender.exe, not blender-launcher.exe")
}