this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pkg/internal/builtintest: don't print superfluous newlines

The additional newline from Fprintln meant the test expected two
newlines rather than just one, which is incorrect.

Change-Id: I6da82454f0f4d331cf40f953ed52f62164ddcb7b
Signed-off-by: Thomas Way <thomas@6f.io>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1171356
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

authored by

Thomas Way and committed by
Daniel Martí
8b32c491 deab3074

+6 -53
-1
cmd/cue/cmd/testdata/script/eval_errs.txtar
··· 25 25 26 26 foo: {a: int} | {b: string} 27 27 bar: foo & {a: "str", b: 2} 28 -
-1
cmd/cue/cmd/testdata/script/eval_expr.txtar
··· 25 25 c: 4 26 26 } 27 27 c: b & {str: "b"} 28 -
-1
cmd/cue/cmd/testdata/script/eval_import.txtar
··· 12 12 ) 13 13 14 14 def: #types: list.MinItems(1) 15 -
-1
cmd/cue/cmd/testdata/script/go_cmd.txtar
··· 3 3 4 4 go version 5 5 stdout '^go version' 6 -
-1
cmd/cue/cmd/testdata/script/vet_yaml.txtar
··· 39 39 lang: no 40 40 text: Stemmen som sier at du ikke klarer det, lyver. 41 41 """ 42 -
+1 -1
cue/ast/astutil/resolve_test.go
··· 65 65 }, nil) 66 66 w.Flush() 67 67 68 - fmt.Fprintln(b) 68 + fmt.Fprint(b) 69 69 } 70 70 }) 71 71 }
-2
cue/ast/astutil/testdata/resolve/comprehensions.txtar
··· 20 20 19[k]: Scope: 7[*ast.ForClause] Node: 8[k] 21 21 20[v]: Scope: 7[*ast.ForClause] Node: 9[v] 22 22 21[y]: Scope: 11[*ast.LetClause] Node: 12[y] 23 - 24 23 -- issue946.cue -- 25 24 x: {for a in a {}} 26 25 y: {for aa in a {}} ··· 31 30 10[y]: Scope: 0[<nil>] Node: 0[] 32 31 13[aa]: Scope: 0[<nil>] Node: 0[] 33 32 14[a]: Scope: 0[<nil>] Node: 0[] 34 -
-2
cue/ast/astutil/testdata/resolve/fieldalias.txtar
··· 10 10 9[a]: Scope: 1[*ast.File] Node: 6[int] 11 11 11[c]: Scope: 0[<nil>] Node: 0[] 12 12 12[X]: Scope: 1[*ast.File] Node: 2[X=a: int] 13 - 14 13 -- dynamic.cue -- 15 14 X=("foo"): int 16 15 Y="\(X)": string ··· 26 25 13[X]: Scope: 1[*ast.File] Node: 2[X=("foo"): int] 27 26 15[b]: Scope: 0[<nil>] Node: 0[] 28 27 16[Y]: Scope: 1[*ast.File] Node: 6[Y="\(X)": string] 29 -
-1
cue/ast/astutil/testdata/resolve/labels.txtar
··· 32 32 34[_]: Scope: 0[<nil>] Node: 0[] 33 33 37[a]: Scope: 0[<nil>] Node: 0[] 34 34 38[_]: Scope: 0[<nil>] Node: 0[] 35 -
-1
cue/ast/astutil/testdata/resolve/let.txtar
··· 9 9 7[int]: Scope: 0[<nil>] Node: 0[] 10 10 9[a]: Scope: 0[<nil>] Node: 0[] 11 11 10[X]: Scope: 1[*ast.File] Node: 5[let X=int] 12 -
-1
cue/ast/astutil/testdata/resolve/value.txtar
··· 8 8 8[c]: Scope: 0[<nil>] Node: 0[] 9 9 9[X]: Scope: 2[*ast.Field] Node: 4[X={c: X.a}] 10 10 10[a]: Scope: 0[<nil>] Node: 0[] 11 -
-1
pkg/crypto/ed25519/testdata/gen.txtar
··· 17 17 t1: false 18 18 t2: false 19 19 t3: _|_ // t3: error in call to crypto/ed25519.Valid: ed25519: publicKey must be 32 bytes 20 -
-1
pkg/crypto/hmac/testdata/hmac.txtar
··· 16 16 t3: "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7" 17 17 t4: "e3d249a8cfb67ef8b7a169e9a0a599714a2cecba65999a51beb8fbbe" 18 18 t5: "6eb242bdbb582ca17bebfa481b1e23211464d2b7f8c20b9ff2201637b93646af5ae9ac316e98db45d9cae773675eeed0" 19 -
-1
pkg/crypto/md5/testdata/gen.txtar
··· 6 6 t1: len(md5.Sum("hash me")) 7 7 -- out/md5 -- 8 8 t1: 16 9 -
-1
pkg/crypto/sha1/testdata/gen.txtar
··· 6 6 t1: len(sha1.Sum("hash me")) 7 7 -- out/sha1 -- 8 8 t1: 20 9 -
-1
pkg/crypto/sha256/testdata/gen.txtar
··· 10 10 t1: '\xeb \x1a\xf5\xaa\xf0\xd6\x06)\xd3Ҧ\x1eFl\xfc\x0f\xed\xb5\x17\xad\xd81\xec\xacR5\xe1کc\xd6' 11 11 t2: 32 12 12 t3: 28 13 -
-1
pkg/crypto/sha512/testdata/gen.txtar
··· 12 12 t2: 48 13 13 t3: 28 14 14 t4: 32 15 -
-1
pkg/encoding/base64/testdata/gen.txtar
··· 19 19 t2: 'foo' 20 20 t3: _|_ // t3: error in call to encoding/base64.Decode: illegal base64 data at input byte 0 21 21 t4: _|_ // t4: error in call to encoding/base64.Decode: base64: unsupported encoding: cannot use value {} (type struct) as null 22 -
-1
pkg/encoding/csv/testdata/gen.txtar
··· 19 19 c 20 20 21 21 """ 22 -
-1
pkg/encoding/hex/testdata/gen.txtar
··· 20 20 00000000 66 6f 6f |foo| 21 21 22 22 """ 23 -
-1
pkg/encoding/json/testdata/gen.txtar
··· 249 249 #result: [1, 2] 250 250 } 251 251 } 252 -
-1
pkg/encoding/yaml/testdata/gen.txtar
··· 75 75 null1: [1, null, 2] 76 76 null2: [1, null, 2] 77 77 } 78 -
+1 -1
pkg/internal/builtintest/testing.go
··· 68 68 t.Fatal(err) 69 69 } 70 70 71 - fmt.Fprintln(t, string(b)) 71 + fmt.Fprint(t, string(b)) 72 72 }) 73 73 }
-1
pkg/list/testdata/gen.txtar
··· 176 176 t52: true 177 177 t53: false 178 178 t54: _|_ // t54: error in call to list.Sort: Ascending.x: 2 errors in empty disjunction: (and 5 more errors) 179 -
-1
pkg/list/testdata/issues.txtar
··· 53 53 a: *1 | 2 54 54 sum: 1 55 55 } 56 -
-1
pkg/list/testdata/list.txtar
··· 178 178 ok3: [0, ...] 179 179 fail1: _|_ // maxItems.fail1: invalid value [0,1] (does not satisfy list.MaxItems(1)): len(list) > MaxItems(1) (2 > 1) (and 1 more errors) 180 180 } 181 -
-1
pkg/list/testdata/sort.txtar
··· 50 50 l2: ["c", "b", "a", "e"] 51 51 l3: ["a", "b", "c", "e"] 52 52 } 53 -
-1
pkg/math/bits/testdata/gen.txtar
··· 30 30 t11: 18446744073709551871 31 31 t12: 7 32 32 t13: 4722366482869645213696 33 -
-1
pkg/math/testdata/consts.txtar
··· 26 26 Log2E: 1.442695040888963407359924681001892137426645954152985934135449408 27 27 Ln10: 2.3025850929940456840179914546843642076011014886287729760333278 28 28 Log10E: 0.43429448190325182765112891891660508229439700580366656611445378 29 -
-1
pkg/math/testdata/gen.txtar
··· 52 52 t31: 2.321928094887362347870319429489391 53 53 t32: 0.5 54 54 t33: 0 55 -
-1
pkg/math/testdata/issue418.txtar
··· 27 27 x: 32.45 28 28 y: _|_ // b.y: conflicting values int and 3.479700443150099001242770375542286 (mismatched types int and float) 29 29 } 30 -
-1
pkg/math/testdata/round.txtar
··· 64 64 ceil1: -2 65 65 trunc0: 2 66 66 trunc1: -2 67 -
-1
pkg/net/testdata/gen.txtar
··· 65 65 t22: "foo/bar" 66 66 t23: "f%25o" 67 67 t24: "f%o" 68 -
+3 -4
pkg/path/testdata/error.txtar
··· 1 1 // Copyright 2020 CUE Authors 2 - // 2 + // 3 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 4 // you may not use this file except in compliance with the License. 5 5 // You may obtain a copy of the License at 6 - // 6 + // 7 7 // http://www.apache.org/licenses/LICENSE-2.0 8 - // 8 + // 9 9 // Unless required by applicable law or agreed to in writing, software 10 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ··· 25 25 Result: 26 26 joinOK: "a/b" 27 27 joinErr: _|_ // joinErr: cannot use "foo" as *"unix" | "windows" | "plan9" | "aix" | "android" | "darwin" | "dragonfly" | "freebsd" | "hurd" | "illumos" | "ios" | "js" | "linux" | "nacl" | "netbsd" | "openbsd" | "solaris" | "zos" in argument 2 to path.Join 28 -
-1
pkg/path/testdata/issues.txtar
··· 10 10 p: *"hello" | string 11 11 q: "hello" 12 12 } 13 -
-1
pkg/path/testdata/join.txtar
··· 201 201 out: "\\\\host\\share\\foo" 202 202 }] 203 203 } 204 -
-1
pkg/path/testdata/os.txtar
··· 502 502 "//host/share/foo/../bar": "//host/share" 503 503 } 504 504 } 505 -
-1
pkg/regexp/testdata/gen.txtar
··· 70 70 t14: "a-l-o-at a-o-o-t -r-o-m" 71 71 t15: "a-${A}-${B}-at a-${A}-${B}-t -${A}-${B}-m" 72 72 t16: "a-$1-$2-at a-$1-$2-t -$1-$2-m" 73 -
-1
pkg/strconv/testdata/gen.txtar
··· 34 34 t8: "170141183460469231731687303715884105728" 35 35 t9: "Z" 36 36 t10: "0" 37 -
-1
pkg/strings/testdata/gen.txtar
··· 60 60 t15: "hello" 61 61 t16: _|_ // t16: invalid value "hello" (does not satisfy strings.MaxRunes(3)) 62 62 t17: _|_ // t17: invalid value "hello" (does not satisfy strings.MinRunes(10)) 63 -
-1
pkg/struct/testdata/gen.txtar
··· 31 31 t5: { 32 32 a: 1 33 33 } 34 -
-1
pkg/struct/testdata/struct.txtar
··· 54 54 } 55 55 fail1: _|_ // maxFields.fail1: invalid value {a:1,b:2} (does not satisfy struct.MaxFields(1)): len(fields) > MaxFields(1) (2 > 1) 56 56 } 57 -
-1
pkg/text/tabwriter/testdata/gen.txtar
··· 20 20 aaa bb vv 21 21 22 22 """ 23 -
-1
pkg/text/template/testdata/gen.txtar
··· 6 6 t1: template.Execute("{{.}}-{{.}}", "foo") 7 7 -- out/template -- 8 8 t1: "foo-foo" 9 -
-1
pkg/time/testdata/duration.txtar
··· 37 37 arg: 600000000 38 38 out: "600ms" 39 39 }] 40 -
-1
pkg/time/testdata/gen.txtar
··· 50 50 nanosecond: 123456 51 51 } 52 52 } 53 -
-1
pkg/uuid/testdata/uuid.txtar
··· 67 67 toInt: { 68 68 a: 93651793875903522077150095950593860979557386807737776869062002310283964632724204171313 69 69 } 70 -
+1 -1
tools/fix/fixall_test.go
··· 38 38 for _, f := range b.Files { 39 39 b, _ := format.Node(f) 40 40 fmt.Fprintln(t, "---", t.Rel(f.Filename)) 41 - fmt.Fprintln(t, string(b)) 41 + fmt.Fprint(t, string(b)) 42 42 } 43 43 } 44 44 })