Skip to content

Commit

Permalink
cue: fix output in ExampleContext
Browse files Browse the repository at this point in the history
If the output comment block of a testable example is not the last
comment block then nothing will be tested. This commit combines the
comment blocks so that the example actually tests against the output.

Fixes #1267
Closes #1385

Signed-off-by: Amelia Downs <adowns@vmware.com>
Change-Id: I2e1d6f0e6445053988f88ff50249071f40744851
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/528130
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
  • Loading branch information
ameowlia authored and myitcv committed Nov 25, 2021
1 parent 9982526 commit f880467
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cue/examplecompile_test.go
Expand Up @@ -44,7 +44,7 @@ func ExampleContext() {
// a: 2
// b: 3
// "a+b": 5

//
// expressions
// a + b: 5
// a * b: 6
Expand Down

0 comments on commit f880467

Please sign in to comment.