internal/core/compile: add new compiler
compile: compiler, but still needs support for builtins and imports
debug: debug representation of internal structures
runtime: just string uniquing functionality for now
cuetxtar: added txtar support, including auto --update and --todo
support.
Change-Id: Idadf6045867b55381f0b3e0da3bc772fa40f7a04
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5840
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/internal/cuetxtar/txtar.go b/internal/cuetxtar/txtar.go
index 943d136..241305f 100644
--- a/internal/cuetxtar/txtar.go
+++ b/internal/cuetxtar/txtar.go
@@ -193,8 +193,9 @@
return nil
}
- p := strings.Index(fullpath, "/testdata/")
- testName := fullpath[p+len("/testdata/") : len(fullpath)-len(".txtar")]
+ str := filepath.ToSlash(fullpath)
+ p := strings.Index(str, "/testdata/")
+ testName := str[p+len("/testdata/") : len(str)-len(".txtar")]
t.Run(testName, func(t *testing.T) {
a, err := txtar.ParseFile(fullpath)