pkg/path/testdata: adapt Go implementation
remove build tags and allow support for multiple OSes
Notes:
- evaluation is still fully hermetic
- many functions may default to Unix by default
- VolumeName defaults to Windows
- Resolve was added instead of Abs. The latter requires
a Getwd(), which wouldn't be hermetic. We could also
overload Join, and change its semantics, but this seems
a bit error-prone.
- In windows both \ and / are interpreted as slashes in
some contexts. It is therefore important to distinguish
between using Separator and IsSeparator.
- Note the super-cool tests. :)
Questions:
- Should VolumeName even take an OS argument?
Change-Id: I080bee599700a98e6019ca0666f72b4a59ba8da1
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7845
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>