cmd/cue/cmd: fix Windows compatibility of test

Change-Id: Ia689ed8352909e7150b263762cc7adbe5afe4fad
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4441
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/cmd/cue/cmd/testdata/script/cmd_dep.txt b/cmd/cue/cmd/testdata/script/cmd_dep.txt
index dcd7ec4..67d3fe8 100644
--- a/cmd/cue/cmd/testdata/script/cmd_dep.txt
+++ b/cmd/cue/cmd/testdata/script/cmd_dep.txt
@@ -2,12 +2,13 @@
 cmp stdout expect-stdout
 
 -- expect-stdout --
-{"b":"cue\n"}
+{"b":"cue"}
 -- task_tool.cue --
 package home
 
 import (
     "encoding/json"
+    "strings"
     "tool/cli"
     "tool/exec"
 )
@@ -23,7 +24,9 @@
         stdout: string
     }
     task: out: cli.Print & {
-        text:  json.Marshal(foo & { a :: task.name.stdout })
+        text:  json.Marshal(foo & {
+            a :: strings.TrimSpace(task.name.stdout)
+        })
     }
 }