github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/agent/probe_test.go (about)

     1  package agent
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  // TestUnameSIsWindowsPosix runs various test cases against unameSIsWindowsPosix
     8  // to validate classification behavior.
     9  func TestUnameSIsWindowsPosix(t *testing.T) {
    10  	// Create test cases.
    11  	testCases := map[string]bool{
    12  		"CYGWIN_NT-6.1":  true,
    13  		"MSYS_NT-6.1":    true,
    14  		"MINGW32_NT-6.1": true,
    15  		"Linux":          false,
    16  	}
    17  
    18  	// Run test cases.
    19  	for u, e := range testCases {
    20  		if unameSIsWindowsPosix(u) != e {
    21  			t.Error("incorrect classification for", u)
    22  		}
    23  	}
    24  }