package config

import (
	"runtime"
	"strings"
	"testing"
)

func TestConfigDirByOS(t *testing.T) {
	d := ConfigDir()
	if runtime.GOOS == "windows" {
		if !strings.Contains(strings.ToLower(d), "programdata") {
			t.Fatalf("windows config dir = %q, want ProgramData path", d)
		}
	} else {
		if d != "/etc/vantage" {
			t.Fatalf("unix config dir = %q, want /etc/vantage", d)
		}
	}
}
