|
| 1 | +Test the behavior of long lines |
| 2 | + |
| 3 | +In the default output, user input affects on which lines which of the output |
| 4 | +lines appear. For example, with a short project name, the line wraps later: |
| 5 | + |
| 6 | + $ cat > dune-project <<EOF |
| 7 | + > (lang dune 3.17) |
| 8 | + > (package |
| 9 | + > (name short)) |
| 10 | + > EOF |
| 11 | + $ dune build |
| 12 | + Error: The package short does not have any user defined stanzas attached to |
| 13 | + it. If this is intentional, add (allow_empty) to the package definition in |
| 14 | + the dune-project file |
| 15 | + -> required by _build/default/short.install |
| 16 | + -> required by alias all |
| 17 | + -> required by alias default |
| 18 | + [1] |
| 19 | + |
| 20 | +With a long project name, there are less words on the line and thus it wraps in |
| 21 | +a different position: |
| 22 | + |
| 23 | + $ cat > dune-project <<EOF |
| 24 | + > (lang dune 3.17) |
| 25 | + > (package |
| 26 | + > (name verylongnamethatcauseslinewrappingincases)) |
| 27 | + > EOF |
| 28 | + $ dune build |
| 29 | + Error: The package verylongnamethatcauseslinewrappingincases does not have |
| 30 | + any user defined stanzas attached to it. If this is intentional, add |
| 31 | + (allow_empty) to the package definition in the dune-project file |
| 32 | + -> required by |
| 33 | + _build/default/verylongnamethatcauseslinewrappingincases.install |
| 34 | + -> required by alias all |
| 35 | + -> required by alias default |
| 36 | + [1] |
| 37 | + |
| 38 | +Disabling line breaks should thus only break lines where there are explicit |
| 39 | +line breaks in the input and not when the line gets too long. |
| 40 | + |
| 41 | + $ export DUNE_CONFIG__SKIP_LINE_BREAK=enabled |
| 42 | + $ dune build |
| 43 | + Error: The package verylongnamethatcauseslinewrappingincases does not have any user defined stanzas attached to it. If this is intentional, add (allow_empty) to the package definition in the dune-project file |
| 44 | + -> required by _build/default/verylongnamethatcauseslinewrappingincases.install |
| 45 | + -> required by alias all |
| 46 | + -> required by alias default |
| 47 | + [1] |
0 commit comments