about summary refs log tree commit diff stats
path: root/sandbox/010-warnings.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-28 14:28:06 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-28 14:28:06 -0800
commit33399312b258ebfbdb3c33e54bb7c46bb402e4fd (patch)
tree274173b7ab2af9b6949b022e0245c3a70a32a48a /sandbox/010-warnings.mu
parente699bbcb07c2bed61c02e8039eb7bc7de2f1b140 (diff)
downloadmu-33399312b258ebfbdb3c33e54bb7c46bb402e4fd.tar.gz
2612 - sandbox/ tests always show recipe errors
I spent the longest time trying to understand what bug 2268 fixed. But
it's being tested now.
Diffstat (limited to 'sandbox/010-warnings.mu')
-rw-r--r--sandbox/010-warnings.mu56
1 files changed, 39 insertions, 17 deletions
diff --git a/sandbox/010-warnings.mu b/sandbox/010-warnings.mu
index f4651db5..a20e306d 100644
--- a/sandbox/010-warnings.mu
+++ b/sandbox/010-warnings.mu
@@ -146,9 +146,17 @@ recipe foo [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   ]
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
+    .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
     .foo                                               .
+    .foo: unknown element foo in container number      .
+    .foo: first ingredient of 'get' should be a contai↩.
+    .ner, but got 123:number                           .
+    .foo: unknown element foo in container number      .
+    .foo: first ingredient of 'get' should be a contai↩.
+    .ner, but got 123:number                           .
     .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
   ]
@@ -386,9 +394,15 @@ recipe foo [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   ]
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
+    .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
     .foo                                               .
+    .foo: missing type for x in 'x <- copy 0'          .
+    .foo: can't copy 0 to x; types don't match         .
+    .foo: missing type for x in 'x <- copy 0'          .
+    .foo: can't copy 0 to x; types don't match         .
     .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
   ]
@@ -412,9 +426,13 @@ recipe foo «
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   ]
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
+    .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
     .foo                                               .
+    .9: unbalanced '\\\[' for recipe                      .
+    .9: unbalanced '\\\[' for recipe                      .
     .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
   ]
@@ -438,11 +456,13 @@ recipe foo [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   ]
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
-    .foo                                               .
-    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
+    .foo                                               .
+    .foo: first ingredient of 'get' should be a contai↩.
+    .ner, but got x:address:shared:point               .
   ]
 ]
 
@@ -465,11 +485,13 @@ recipe foo [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   ]
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
-    .foo                                               .
-    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
+    .foo                                               .
+    .foo: expected ingredient 1 of 'get' to have type ↩.
+    .'offset'; got x:number                            .
   ]
 ]
 
@@ -489,11 +511,12 @@ recipe foo [
   ]
   event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
-    .foo                                               .
-    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
+    .foo                                               .
+    .foo: use before set: y                            .
   ]
   # rerun the file, check for the same error
   assume-console [
@@ -503,11 +526,12 @@ recipe foo [
     event-loop screen:address:shared:screen, console:address:shared:console, 3:address:shared:programming-environment-data, 1:address:shared:array:character/test-recipes
   ]
   screen-should-contain [
-    # TODO: make this more specific
     .  errors found                 run (F4)           .
-    .foo                                               .
-    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
     .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0                                                x.
+    .foo                                               .
+    .foo: use before set: y                            .
   ]
 ]
 
@@ -546,8 +570,6 @@ scenario run-instruction-and-print-warnings [
   ]
 ]
 
-# TODO: print warnings in file even if you can't run a sandbox
-
 scenario run-instruction-and-print-warnings-only-once [
   trace-until 100/app  # trace too long
   assume-screen 50/width, 10/height