...

Text file src/cuelang.org/go/cue/testdata/readme.md

Documentation: cuelang.org/go/cue/testdata

     1# CUE Test Suite
     2
     3This directory contains a test suite for testing the CUE language. This is only
     4intended to test language evaluation and exporting. Eventually it will also
     5contains tests for parsing and formatting. It is not intended to cover
     6testing of the API itself.
     7
     8## Overview
     9
    10### Work in progress
    11
    12The tests are currently converted from various internal Go tests and the
    13grouping reflect properties of the current implementation. Once the transition
    14to the new implementation is completed, tests should be reordered along more
    15logical lines: such as literals, expressions, references, cycles, etc.
    16
    17
    18## Forseen Structure
    19
    20The txtar format allows a collection of files to be defined. Any .cue file
    21is used as an input. The out/* files, which should not have an extension,
    22define outputs for various tests. A test definition is active for a certain test
    23if it contains output for this test.
    24
    25The comments section of the txtar file may contain additional control inputs for
    26a test. Each line that starts with a `#` immediately followed by a letter or
    27digit is specially interpreted. These can be boolean tags (`#foo`) or a
    28key-value pair (`#key: value`), where the value can be a free-form string.
    29A line starting with `#` followed by a space is interpreted as a comment.
    30
    31Lines not starting with a `#` are for interpretation by the testscript package.
    32
    33This organization allows the same test sets to be used for the testing of
    34tooling as well as internal libraries.
    35
    36## Common options
    37
    38- `#skip`: skip this test case for all tests
    39- `#skip-{name}`: skip this test for the namesake test
    40- `#todo-{name}`: skip this test for the namesake test, but run it if the
    41   `--todo` flag is specified.
    42
    43
    44## Tests
    45
    46### cue/internal/compile
    47
    48Compiles all *.cue files and prints the debug string of the internal
    49representation. This is not valid CUE.

View as plain text