about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-30 11:12:35 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-30 11:14:33 -0700
commit76acf2b00e5fb265f1b64b2194367d2848afe400 (patch)
tree8ba446e95956eb3891f39583a0f03bf5a4ba37b0
parent31e1feae425597c5c17f54af2e21b559caae4158 (diff)
downloadmu-76acf2b00e5fb265f1b64b2194367d2848afe400.tar.gz
1513 - final repl test was never failing
I'm still having trouble with prematurely closed strings or strings
never being closed. Remember that when escaping brackets inside
scenarios you usually need two levels of escaping. The single-level is
a no-op and usually misleading. When brackets balance, don't bother
escaping. When they don't, escape twice.
-rw-r--r--repl.mu8
1 files changed, 4 insertions, 4 deletions
diff --git a/repl.mu b/repl.mu
index 383aa406..1e95e7bf 100644
--- a/repl.mu
+++ b/repl.mu
@@ -550,7 +550,7 @@ scenario read-instruction-cancel-string-on-backspace [
 
 scenario read-instruction-cancel-string-inside-string-on-backspace [
   assume-screen 30:literal/width, 5:literal/height
-  assume-keyboard [\[a\[b\]<<<b\]
+  assume-keyboard [[a[b]<<<b]
 ]
   # setup: replace '<'s with backspace key since we can't represent backspace in strings
   run [
@@ -578,7 +578,7 @@ scenario read-instruction-cancel-string-inside-string-on-backspace [
 scenario read-instruction-backspace-back-into-string [
   assume-screen 30:literal/width, 5:literal/height
   # need to escape the '[' once for 'scenario' and once for 'assume-keyboard'
-  assume-keyboard [\[a\]<b
+  assume-keyboard [[a]<b
 ]
   # setup: replace '<'s with backspace key since we can't represent backspace in strings
   run [
@@ -590,11 +590,11 @@ scenario read-instruction-backspace-back-into-string [
     read-instruction keyboard:address, screen:address
   ]
   screen-should-contain [
-    .\[ab                           .
+    .\\\[ab                           .
     .                              .
   ]
   screen-should-contain-in-color 6:literal/cyan, [
-    .\[ab                           .
+    .\\\[ab                           .
     .                              .
   ]
   screen-should-contain-in-color 7:literal/white, [