...

Source file src/github.com/Microsoft/hcsshim/internal/runhcs/util_test.go

Documentation: github.com/Microsoft/hcsshim/internal/runhcs

     1  package runhcs
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func Test_SafePipePath(t *testing.T) {
     8  	tests := []string{"test", "test with spaces", "test/with\\\\.\\slashes", "test.with..dots..."}
     9  	expected := []string{"test", "test%20with%20spaces", "test%2Fwith%5C%5C.%5Cslashes", "test.with..dots..."}
    10  	for i, test := range tests {
    11  		actual := SafePipePath(test)
    12  		e := SafePipePrefix + expected[i]
    13  		if actual != e {
    14  			t.Fatalf("SafePipePath: actual '%s' != '%s'", actual, expected[i])
    15  		}
    16  	}
    17  }
    18  

View as plain text