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

     1  package url
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestIsWindowsPathLowercase(t *testing.T) {
     8  	if !isWindowsPath(`c:\something`) {
     9  		t.Error("Windows path not classified as such")
    10  	}
    11  }
    12  
    13  func TestIsWindowsPathLowercaseForwardSlash(t *testing.T) {
    14  	if !isWindowsPath(`c:/something`) {
    15  		t.Error("Windows path not classified as such")
    16  	}
    17  }
    18  
    19  func TestIsWindowsPath(t *testing.T) {
    20  	if !isWindowsPath(`C:\something`) {
    21  		t.Error("Windows path not classified as such")
    22  	}
    23  }
    24  
    25  func TestIsWindowsPathForwardSlash(t *testing.T) {
    26  	if !isWindowsPath(`C:/something`) {
    27  		t.Error("Windows path not classified as such")
    28  	}
    29  }
    30  
    31  func TestIsWindowsPathLengthTwoDrive(t *testing.T) {
    32  	if isWindowsPath(`CD:\something`) {
    33  		t.Error("non-Windows path classified as such")
    34  	}
    35  }