diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:04:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-30 18:49:19 +0200 |
| commit | 1ee1d078e2480ddd08d40915bc7a74a8352acff0 (patch) | |
| tree | 1e7ff367278a19fead3e404cf06d65bfb80a6cd9 /tests/typ/layout | |
| parent | 42a27b48df427edf8dbb624c51551a90ecf2e7ea (diff) | |
Fatal errors
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free
- Parsing still recovers and can produce multiple errors
- Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import)
- The single error that could occur during execution is removed for now
- Removes Value::Error variant
Diffstat (limited to 'tests/typ/layout')
| -rw-r--r-- | tests/typ/layout/grid-3.typ | 18 | ||||
| -rw-r--r-- | tests/typ/layout/pad.typ | 3 | ||||
| -rw-r--r-- | tests/typ/layout/page.typ | 3 | ||||
| -rw-r--r-- | tests/typ/layout/pagebreak.typ | 3 | ||||
| -rw-r--r-- | tests/typ/layout/spacing.typ | 1 |
5 files changed, 11 insertions, 17 deletions
diff --git a/tests/typ/layout/grid-3.typ b/tests/typ/layout/grid-3.typ index 38572520..450ce60c 100644 --- a/tests/typ/layout/grid-3.typ +++ b/tests/typ/layout/grid-3.typ @@ -25,9 +25,9 @@ gutter-columns: (0pt, 10%), image("../../res/rhino.png"), align(right, rect(width: 100%, fill: eastern)[LoL]), - "rofl", - "\nA" * 3, - "Ha!\n" * 3, + [rofl], + [\ A] * 3, + [Ha!\ ] * 3, ) --- @@ -38,9 +38,9 @@ gutter-rows: (8pt,), gutter-columns: (0pt, 10%), [A], [B], [C], - "Ha!\n" * 6, - "rofl", - "\nA" * 3, + [Ha!\ ] * 6, + [rofl], + [\ A] * 3, [hello], [darkness], [my old] @@ -54,10 +54,10 @@ gutter-rows: (10pt,), gutter-columns: (0pt, 10%), [A], [B], [C], [D], - grid(columns: 2, [A], [B], "C\n"*3, [D]), + grid(columns: 2, [A], [B], [C\ ]*3, [D]), align(right, rect(width: 100%, fill: eastern)[LoL]), - "rofl", - "E\n"*4, + [rofl], + [E\ ]*4, ) --- diff --git a/tests/typ/layout/pad.typ b/tests/typ/layout/pad.typ index d43cafc5..eba68af2 100644 --- a/tests/typ/layout/pad.typ +++ b/tests/typ/layout/pad.typ @@ -10,8 +10,7 @@ #rect(width: 20pt, height: 20pt, fill: rgb("eb5278")) ] -// Error: 13-23 missing argument: body -Hi #box(pad(left: 10pt)) there +Hi #box(pad(left: 10pt)[]) there --- #let pad(body) = pad(left: 10pt, right: 10pt, body) diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ index d154d5f4..ba87ad51 100644 --- a/tests/typ/layout/page.typ +++ b/tests/typ/layout/page.typ @@ -22,9 +22,6 @@ // Ensure that specific margins override general margins. #page(margins: 0pt, left: 20pt)[Overriden] -// Error: 8-19 unknown variable -#page!(nonexistant) - // Flipped predefined paper. #page("a11", flip: true)[Flipped A11] diff --git a/tests/typ/layout/pagebreak.typ b/tests/typ/layout/pagebreak.typ index b13a1bfd..ff15d156 100644 --- a/tests/typ/layout/pagebreak.typ +++ b/tests/typ/layout/pagebreak.typ @@ -10,10 +10,7 @@ First of two A #box[ B - // Error: 16 cannot modify page from here #pagebreak() - - // Error: 11-15 cannot modify page from here #page("a4")[] ] C diff --git a/tests/typ/layout/spacing.typ b/tests/typ/layout/spacing.typ index bd38631e..ec520063 100644 --- a/tests/typ/layout/spacing.typ +++ b/tests/typ/layout/spacing.typ @@ -13,6 +13,7 @@ Add #h(10pt) #h(10pt) up // Relative to font size. Relative #h(100%) spacing +--- // Missing spacing. // Error: 12 missing argument: spacing Totally #h() ignored |
