this repo has no description
0
fork

Configure Feed

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

cmd/cue: add a test case for loading an empty YAML file

For #3744.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ib88931e2ca7a551e5d80b9c468b13ca318fc60ec
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211359
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>

+22
+22
cmd/cue/cmd/testdata/script/empty_yaml.txtar
··· 1 + # Empty YAML files by themselves decode as null, following the YAML spec. 2 + # However, for the sake of the user experience when joining with other YAML files, 3 + # we allow unifying with them as well. This is done by decoding empty YAML as `*null | _`. 4 + # TODO: implement the above and make the second test case below work. 5 + 6 + exec cue export empty.yaml 7 + cmp stdout export-empty.stdout 8 + 9 + ! exec cue export one.yaml empty.yaml two.yaml 10 + cmp stderr export-all.stderr 11 + 12 + -- export-empty.stdout -- 13 + null 14 + -- export-all.stderr -- 15 + conflicting values null and {two:"two text"} (mismatched types null and struct): 16 + 17 + ./two.yaml:1:1 18 + -- one.yaml -- 19 + one: "one text" 20 + -- empty.yaml -- 21 + -- two.yaml -- 22 + two: "two text"