Skip to content

Commit 36aed15

Browse files
committed
add missing ends of here-docs to cram tests
1 parent 2d1339a commit 36aed15

File tree

9 files changed

+23
-2
lines changed

9 files changed

+23
-2
lines changed

test/black/axiomK.t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Using the Martin-Löf "Jdentity type" as an indexed datatype, we can try to prov
44
> def Jd (A:Type) (a:A) : A → Type ≔ data [
55
> | rfl. : Jd A a a
66
> ]
7+
> EOF
78

89
$ narya -source-only jd.ny -v -e 'def USIP (A:Type) (a:A) (e:Jd A a a) : Jd (Jd A a a) e rfl. := match e [ rfl. |-> rfl. ]'
910
→ info[I0000]
@@ -67,6 +68,7 @@ The following indexed datatype appears in Agda bug #1025.
6768
> axiom A : Type
6869
> axiom a : A
6970
> def Foo : Jd A a a → Type ≔ data [ foo. : Foo rfl. ]
71+
> EOF
7072

7173
$ narya -source-only jd.ny foo.ny -v -e 'def test (e : Jd A a a) (f : Foo e) (i : Jd (Foo e) f f) : Jd (Jd (Foo e) f f) i rfl. ≔ match f [ foo. ↦ match i [ rfl. ↦ rfl. ]]'
7274
→ info[I0000]
@@ -105,6 +107,7 @@ The heterogeneous Jdentity type also figures in some inconsistencies, such as Ag
105107
> def Bool : Type ≔ data [ true. | false. ]
106108
> def D : Bool → Type ≔ data [ x. : D true. | y. : D false. ]
107109
> def ∅ : Type ≔ data []
110+
> EOF
108111

109112
$ narya -source-only hjd.ny -v -e 'def notpdf (u : D false.) (e : Hd (D false.) u (D true.) x.) : ∅ ≔ match e [ ]'
110113
→ info[I0000]

test/black/binop.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
> echo (m+n)*(m+n)
2020
> echo n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n + n
2121
> echo n + n * n + n * n * n + n * n * n * n + n + n * n * n * n * n * n * n + n * n + n * n * n + n * n * n * n + n + n * n * n * n * n * n * n
22-
22+
> EOF
2323

2424
$ narya -v nat.ny
2525
→ info[I0000]

test/black/compile.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Requiring a file multiple times
7575
> import "two"
7676
> import "three"
7777
> axiom a2 : Id A a0 a1
78+
> EOF
7879

7980
$ narya -v four.ny
8081
→ info[I0004]

test/black/discreteness.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Datatypes with nondiscrete parameters are not discrete:
124124
> axiom A : Type
125125
> axiom l : List A
126126
> def T ≔ (List A)⁽ᵈ⁾ l
127+
> EOF
127128

128129
$ narya -source-only -v -arity 1 -direction d -discreteness param.ny jd.ny -e 'def test (t1 : T) (t2 : T) : Jd T t1 t2 ≔ rfl.'
129130
→ info[I0000]
@@ -159,6 +160,7 @@ Even trivial parameters:
159160
> axiom A : Type
160161
> axiom l : param_empty A
161162
> def T ≔ (param_empty A)⁽ᵈ⁾ l
163+
> EOF
162164

163165
$ narya -source-only -v -arity 1 -direction d -discreteness param2.ny jd.ny -e 'def test (t1 : T) (t2 : T) : Jd T t1 t2 ≔ rfl.'
164166
→ info[I0000]
@@ -195,6 +197,7 @@ But datatypes with discrete parameters are discrete:
195197
> def param_empty (n:ℕ) : Type ≔ data [ ]
196198
> axiom l : param_empty zero.
197199
> def T ≔ (param_empty zero.)⁽ᵈ⁾ l
200+
> EOF
198201

199202
$ narya -source-only -v -arity 1 -direction d -discreteness param3.ny jd.ny -e 'def test (t1 : T) (t2 : T) : Jd T t1 t2 ≔ rfl.'
200203
→ info[I0000]
@@ -225,6 +228,7 @@ Datatypes with discrete indices are discrete:
225228
> axiom n :
226229
> axiom z : iszero n
227230
> def T ≔ (iszero n)⁽ᵈ⁾ z
231+
> EOF
228232

229233
$ narya -source-only -v -arity 1 -direction d -discreteness index.ny jd.ny -e 'def test (t1 : T) (t2 : T) : Jd T t1 t2 ≔ rfl.'
230234
→ info[I0000]
@@ -257,6 +261,7 @@ But datatypes with nondiscrete indices, even trivial ones, are not discrete:
257261
> def index_unit : N → Type ≔ data [ foo. : index_unit n ]
258262
> axiom z : index_unit n
259263
> def T ≔ (index_unit n)⁽ᵈ⁾ z
264+
> EOF
260265

261266
$ narya -source-only -v -arity 1 -direction d -discreteness index2.ny jd.ny -e 'def test (t1 : T) (t2 : T) : Jd T t1 t2 ≔ rfl.'
262267
→ info[I0001]
@@ -295,6 +300,7 @@ Datatypes with constructors having non-discrete arguments are not discrete:
295300
> def foo : Type ≔ data [ foo. (_:Type) ]
296301
> axiom f : foo
297302
> def T ≔ foo⁽ᵈ⁾ f
303+
> EOF
298304

299305
$ narya -source-only -v -arity 1 -direction d -discreteness constr.ny jd.ny -e 'def test (t1 : T) (t2 : T) : Jd T t1 t2 ≔ rfl.'
300306
→ info[I0000]

test/black/hdpi.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Printing higher-dimensional pi-types
88
> axiom B' : B → Type
99
> axiom E' : refl ((XX → Type) : Type → Type) A B E A' B'
1010
> echo refl ((A B ↦ (x:A) → B x) : (X:Type) → (X → Type) → Type) A B E A' B' E'
11+
> EOF
1112

1213
$ narya hdpi.ny
1314
refl Π A B E (x ↦ A' x) (x ↦ B' x) (x ⤇ E' x.0 x.1 x.2)

test/black/import.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Requiring a file multiple times
8989
> import "two"
9090
> import "three"
9191
> axiom a2 : Id A a0 a1
92+
> EOF
9293

9394
$ narya -source-only -v twothree.ny
9495
→ info[I0003]
@@ -130,6 +131,7 @@ Requiring a file multiple times
130131
> import "two"
131132
> import "three"
132133
> axiom a2 : Id A a0 a1
134+
> EOF
133135

134136
$ narya -source-only -v four.ny
135137
→ info[I0003]

test/black/letin.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ Let doesn't make a case tree unless it needs to:
342342
> echo foo
343343
> def foo' : prod (Type -> Type) Type := let z : prod (Type -> Type) Type := ( fst := X |-> X, snd := Type ) in z
344344
> echo foo'
345+
> EOF
345346

346347
$ narya -v letnocase.ny
347348
→ info[I0000]
@@ -397,6 +398,7 @@ Pattern-matching lambdas can be used in arbitrary places:
397398
> echo squaredec 1
398399
> axiom n :
399400
> echo squaredec n
401+
> EOF
400402
→ info[I0000]
401403
constantdefined
402404

@@ -423,6 +425,7 @@ Pattern-matching lambdas can be used in arbitrary places:
423425
_match.0{…}
424426
:
425427

428+
426429
Matches in definitions of datatypes
427430

428431
$ narya -v - <<EOF
@@ -444,6 +447,7 @@ Matches in definitions of datatypes
444447
→ info[I0000]
445448
constant f defined
446449

450+
447451
Matches in non-toplevel definitions of datatype
448452

449453
$ narya -v - <<EOF
@@ -474,3 +478,4 @@ Matches in non-toplevel definitions of datatype
474478
→ info[I0000]
475479
constant f defined
476480

481+

test/black/transparent.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Transparency and translucency
3030
> echo x3b
3131
> def y3b : prod3b ≔ (a,b)
3232
> echo y3b
33+
> EOF
3334
x1
3435
: prod1
3536

@@ -60,3 +61,4 @@ Transparency and translucency
6061
(a, b)
6162
: prod3b
6263

64+

test/parser/cube_variables.t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Testing parsing and printing of cube variables
2020
> axiom a0:A
2121
> axiom a1:A
2222
> axiom a2:Id A a0 a1
23-
> echo refl f a0 a1 a2
23+
> echo refl f a0 a1 a2
24+
> EOF
2425

2526
$ narya cube_vars.ny
2627
x0 x1 x2 ↦ refl b

0 commit comments

Comments
 (0)