about summary refs log tree commit diff stats
path: root/sandbox
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
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')
-rw-r--r--sandbox/005-sandbox.mu1
-rw-r--r--sandbox/010-warnings.mu56
2 files changed, 39 insertions, 18 deletions
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index 08bdf37f..929716a1 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -136,7 +136,6 @@ recipe run-sandboxes env:address:shared:programming-environment-data, screen:add
   local-scope
   load-ingredients
   errors-found?:boolean, env, screen <- update-recipes env, screen, test-recipes
-  reply-if errors-found?
   # check contents of editor
   <run-sandboxes-begin>
   current-sandbox:address:shared:editor-data <- get *env, current-sandbox:offset
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