Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: add more test case for exporting to a filename
First, a case where we export to a path which cannot be created. In the case of this test, because the parent directory does not exist, but there could be other reasons as well, like a permission error. "cue export -o" swallows that type of error, hence the bug. The test is inverted until the next commit fixes the bug. Second, a case where two export commands write to the same new file. This is racy without the --force flag currently, since the encoder checks for file presence via os.Stat first, and only later creates the file when the export has finished. The slightly slow bit of CUE makes the race likely to cause failures, but it's still racy behavior until fixed nonetheless, so the test is commented out until the next commit. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I92b1cbea50a5da4bd8d70edb86031eebb5a60b19 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1169708 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
- Loading branch information