28 lines
637 B
Go
28 lines
637 B
Go
package tui
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestContainsOption_present(t *testing.T) {
|
|
opts := []string{"force", "vertical-slices", "omit-test"}
|
|
if !containsOption(opts, "vertical-slices") {
|
|
t.Error("containsOption failed to find present option")
|
|
}
|
|
}
|
|
|
|
func TestContainsOption_absent(t *testing.T) {
|
|
opts := []string{"force", "vertical-slices"}
|
|
if containsOption(opts, "omit-test") {
|
|
t.Error("containsOption found absent option")
|
|
}
|
|
}
|
|
|
|
func TestDefaultOutputDir_stable(t *testing.T) {
|
|
out1 := defaultOutputDir()
|
|
out2 := defaultOutputDir()
|
|
if out1 != out2 {
|
|
t.Error("defaultOutputDir should be deterministic for same cwd")
|
|
}
|
|
}
|