You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: windows_parser_test.go
    path of file: ./repos/moby/volume/mounts
    
    the code of the file until where you have to start completion: package mounts // import "github.com/docker/docker/volume/mounts"

import (
	"fmt"
	"strings"
	"testing"

	"github.com/docker/docker/api/types/mount"
	"gotest.tools/v3/assert"
	is "gotest.tools/v3/assert/cmp"
)

func TestWindowsParseMountRaw(t *testing.T) {
	valid := []string{
		`d:\`,
		`d:`,
		`d:\path`,
		`d:\path with space`,
		`c:\:d:\`,
		`c:\windows\:d:`,
		`c:\windows:d:\s p a c e`,
		`c:\windows:d:\s p a c e:RW`,
		`c:\program files:d:\s p a c e i n h o s t d i r`,
		`0123456789name:d:`,
		`MiXeDcAsEnAmE:d:`,
		`test-aux-volume:d:`, // includes reserved word, but is not one itself
		`name:D:`,
		`name:D::rW`,
		`name:D::RW`,
		`name:D::RO`,
		`c:/:d:/forward/slashes/are/good/too`,
		`c:/:d:/including with/spaces:ro`,
		`c:\Windows`,                // With capital
		`c:\Program Files (x86)`,    // With capitals and brackets
		`\\?\c:\windows\:d:`,        // Long path handling (source)
		`c:\windows\:\\?\d:\`,       // Long path handling (target)
		`\\.\pipe\foo:\\.\pipe\foo`, // named pipe
		`//./pipe/foo://./pipe/foo`, // named pipe forward slashes
	}

	invalid := map[string]string{
		``:                                 "invalid volume specification: ",
		`.`:                                "invalid volume specification: ",
		`..\`:                              "invalid volume specification: ",
		`c:\:..\`:                          "invalid volume specification: ",
		`c:\:d:\:xyzzy`:                    "invalid volume specification: ",
		`c:`:                               "cannot be `c:`",
		`c:\`:                              "cannot be `c:`",
		`c:\notexist:d:`:                   `source path does not exist: c:\notexist`,
		`c:\windows\system32\ntdll.dll:d:`: `source path must be a directory`,
		`name<:d:`:                         `invalid volume specification`,
		`name>:d:`:                         `invalid volume specification`,
		`name::d:`:                         `invalid volume specification`,
		`name":d:`:                         `invalid volume specification`,
		`name\:d:`:                         `invalid volume specification`,
		`name*:d:`:                         `invalid volume specification`,
		`name|:d:`:                         `invalid volume specification`,
		`name?:d:`:                         `invalid volume specification`,
		`name/
    
func TestWindowsParseMountRawSplit(t *testing.T) {
	cases := []struct {
		bind      string
		driver    string
		expType   mount.Type
		expDest   string
		expSource string
		expName   string
		expDriver string
		expRW     bool
		fail      bool
	}{
		{
			bind:      `c:\:d:`,
			driver:    "local",
			expType:   mount.TypeBind,
			expDest:   `d:`,
			expSource: `c:\`,
			expRW:     true,
		},
		{
			bind:      `c:\:d:\`,
			driver:    "local",
			expType:   mount.TypeBind,
			expDest:   `d:\`,
			expSource: `c:\`,
			expRW:     true,
		},
		{
			bind:      `c:\:d:\:ro`,
			driver:    "local",
			expType:   mount.TypeBind,
			expDest:   `d:\`,
			expSource: `c:\`,
		},
		{
			bind:      `c:\:d:\:rw`,
			driver:    "local",
			expType:   mount.TypeBind,
			expDest:   `d:\`,
			expSource: `c:\`,
			expRW:     true,
		},
		{
			bind:      `c:\:d:\:foo`,
			driver:    "local",
			expType:   mount.TypeBind,
			expDest:   `d:\`,
			expSource: `c:\`,
			fail:      true,
		},
		{
			bind:      `name:d::rw`,
			driver:    "local",
			expType:   mount.TypeVolume,
			expDest:   `d:`,
			expName:   `name`,
			expDriver: "local",
			expRW:     true,
		},
		{
			bind:      `name:d:`,
			driver:    "local",
			expType:   mount.TypeVolume,
			expDest:   `d:`,
			expName:   `name`,
			expDriver: "local",
			expRW:     true,
		},
		{
			bind:      `name:d::ro`,
			driver:    "local",
			expType:   mount.TypeVolume,
			expDest:   `d:`,
			expName:   `name`,
			expDriver: "local",
		},
		{
			bind:    `name:c:`,
			expType: mount.TypeVolume,
			expRW:   true,
			fail:    true,
		},
		{
			bind:    `driver/name:c:`,
			expType: mount.TypeVolume,
			expRW:   true,
			fail:    true,
		},
		{
			bind:      `\\.\pipe\foo:\\.\pipe\bar`,
			driver:    "local",
			expType:   mount.TypeNamedPipe,
			expDest:   `\\.\pipe\bar`,
			expSource: `\\.\pipe\foo`,
			expRW:     true,
		},
		{
			bind:    `\\.\pipe\foo:c:\foo\bar`,
			driver:  "local",
			expType: mount.TypeNamedPipe,
			expRW:   true,
			fail:    true,
		},
		{
			bind:    `c:\foo\bar:\\.\pipe\foo`,
			driver:  "local",
			expType: mount.TypeNamedPipe,
			expRW:   true,
			fail:    true,
		},
	}

	parser := NewWindowsParser()
	if p, ok := parser.(*windowsParser); ok {
		p.fi = mockFiProvider{}
	}

	for _, tc := range cases {
		tc := tc
		t.Run(tc.bind, func(t *testing.T) {
			m, err := parser.ParseMountRaw(tc.bind, tc.driver)
			if tc.fail {
				assert.Check(t, is.ErrorContains(err, ""), "expected an error")
				return
			}

			assert.NilError(t, err)
			assert.Check(t, is.Equal(m.Destination, tc.expDest))
			assert.Check(t, is.Equal(m.Source, tc.expSource))
			assert.Check(t, is.Equal(m.Name, tc.expName))
			assert.Check(t, is.Equal(m.Driver, tc.expDriver))
			assert.Check(t, is.Equal(m.RW, tc.expRW))
			assert.Check(t, is.Equal(m.Type, tc.expType))
		})
	}
}