glob_windows_test.go 614 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2014 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. // +build windows
  7. package osutil_test
  8. import (
  9. "testing"
  10. "github.com/syncthing/syncthing/lib/osutil"
  11. )
  12. func TestGlob(t *testing.T) {
  13. testcases := []string{
  14. `C:\*`,
  15. `\\?\C:\*`,
  16. `\\?\C:\Users`,
  17. `\\?\\\?\C:\Users`,
  18. }
  19. for _, tc := range testcases {
  20. if _, err := osutil.Glob(tc); err != nil {
  21. t.Fatalf("pattern %s failed: %v", tc, err)
  22. }
  23. }
  24. }