diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-24 16:00:44 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-24 16:00:44 -0700 |
commit | aac2775a4d30459c3090569b26e81ba18f1423a7 (patch) | |
tree | 4dfec62ec660fa9a0297cfc813b133286d3ece2e /html/edit/009-sandbox-test.mu.html | |
parent | d467b0a5b2ebf4e3bbfb510ca317e6141cce0d06 (diff) | |
download | mu-aac2775a4d30459c3090569b26e81ba18f1423a7.tar.gz |
3951
Diffstat (limited to 'html/edit/009-sandbox-test.mu.html')
-rw-r--r-- | html/edit/009-sandbox-test.mu.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/html/edit/009-sandbox-test.mu.html b/html/edit/009-sandbox-test.mu.html index 3bf4d96b..ecdd04c6 100644 --- a/html/edit/009-sandbox-test.mu.html +++ b/html/edit/009-sandbox-test.mu.html @@ -75,13 +75,13 @@ if ('onhashchange' in window) { <span id="L12" class="LineNr"> 12 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> |]</span>| <span id="L13" class="LineNr"> 13 </span> <span class="Conceal">¦</span> ] <span id="L14" class="LineNr"> 14 </span> ] -<span id="L15" class="LineNr"> 15 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, <span class="Constant">[foo]</span> -<span id="L16" class="LineNr"> 16 </span> <a href='004-programming-environment.mu.html#L402'>render-all</a> <a href='../081print.mu.html#L4'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> +<span id="L15" class="LineNr"> 15 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L16'>screen</a>, <span class="Constant">[foo]</span> +<span id="L16" class="LineNr"> 16 </span> <a href='004-programming-environment.mu.html#L402'>render-all</a> <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L17" class="LineNr"> 17 </span> <span class="Comment"># run it</span> <span id="L18" class="LineNr"> 18 </span> assume-console [ <span id="L19" class="LineNr"> 19 </span> <span class="Conceal">¦</span> press F4 <span id="L20" class="LineNr"> 20 </span> ] -<span id="L21" class="LineNr"> 21 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> +<span id="L21" class="LineNr"> 21 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L22" class="LineNr"> 22 </span> screen-should-contain [ <span id="L23" class="LineNr"> 23 </span> <span class="Conceal">¦</span><span class="Constant"> . run (F4) .</span> <span id="L24" class="LineNr"> 24 </span> <span class="Conceal">¦</span><span class="Constant"> .recipe foo [ ╎ .</span> @@ -97,7 +97,7 @@ if ('onhashchange' in window) { <span id="L34" class="LineNr"> 34 </span> <span class="Conceal">¦</span> left-click<span class="Constant"> 5</span>,<span class="Constant"> 51</span> <span id="L35" class="LineNr"> 35 </span> ] <span id="L36" class="LineNr"> 36 </span> run [ -<span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> +<span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L38" class="LineNr"> 38 </span> ] <span id="L39" class="LineNr"> 39 </span> <span class="Comment"># color toggles to green</span> <span id="L40" class="LineNr"> 40 </span> screen-should-contain-in-color <span class="Constant">2/green</span>, [ @@ -113,7 +113,7 @@ if ('onhashchange' in window) { <span id="L50" class="LineNr"> 50 </span> <span class="Comment"># cursor should remain unmoved</span> <span id="L51" class="LineNr"> 51 </span> run [ <span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span> cursor:char <span class="Special"><-</span> copy <span class="Constant">9251/␣</span> -<span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L4'>screen</a>, cursor +<span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, cursor <span id="L54" class="LineNr"> 54 </span> ] <span id="L55" class="LineNr"> 55 </span> screen-should-contain [ <span id="L56" class="LineNr"> 56 </span> <span class="Conceal">¦</span><span class="Constant"> . run (F4) .</span> @@ -134,7 +134,7 @@ if ('onhashchange' in window) { <span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> press F4 <span id="L72" class="LineNr"> 72 </span> ] <span id="L73" class="LineNr"> 73 </span> run [ -<span id="L74" class="LineNr"> 74 </span> <span class="Conceal">¦</span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> +<span id="L74" class="LineNr"> 74 </span> <span class="Conceal">¦</span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L16'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L75" class="LineNr"> 75 </span> ] <span id="L76" class="LineNr"> 76 </span> <span class="Comment"># result turns red</span> <span id="L77" class="LineNr"> 77 </span> screen-should-contain-in-color <span class="Constant">1/red</span>, [ @@ -165,7 +165,7 @@ if ('onhashchange' in window) { <span id="L102" class="LineNr">102 </span> <span class="Delimiter">}</span> <span id="L103" class="LineNr">103 </span>] <span id="L104" class="LineNr">104 </span> -<span id="L105" class="LineNr">105 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L458'><end-restore-sandbox></a></span> [ +<span id="L105" class="LineNr">105 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L485'><end-restore-sandbox></a></span> [ <span id="L106" class="LineNr">106 </span> <span class="Delimiter">{</span> <span id="L107" class="LineNr">107 </span> <span class="Conceal">¦</span> filename <span class="Special"><-</span> append filename, <span class="Constant">[.out]</span> <span id="L108" class="LineNr">108 </span> <span class="Conceal">¦</span> contents <span class="Special"><-</span> <a href='../088file.mu.html#L38'>slurp</a> <a href='../088file.mu.html#L11'>resources</a>, filename @@ -194,8 +194,8 @@ if ('onhashchange' in window) { <span id="L131" class="LineNr">131 </span> <span class="Conceal">¦</span> <span class="Comment"># toggle its expected-response, and save session</span> <span id="L132" class="LineNr">132 </span> <span class="Conceal">¦</span> sandbox <span class="Special"><-</span> <a href='009-sandbox-test.mu.html#L166'>toggle-expected-response</a> sandbox <span id="L133" class="LineNr">133 </span> <span class="Conceal">¦</span> <a href='005-sandbox.mu.html#L226'>save-sandboxes</a> env, <a href='../088file.mu.html#L11'>resources</a> -<span id="L134" class="LineNr">134 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L4'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> -<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L469'>update-cursor</a> <a href='../081print.mu.html#L4'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env +<span id="L134" class="LineNr">134 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> +<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env <span id="L136" class="LineNr">136 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> <span id="L137" class="LineNr">137 </span> <span class="Delimiter">}</span> <span id="L138" class="LineNr">138 </span>] @@ -244,7 +244,7 @@ if ('onhashchange' in window) { <span id="L181" class="LineNr">181 </span>] <span id="L182" class="LineNr">182 </span> <span id="L183" class="LineNr">183 </span><span class="Comment"># when rendering a sandbox, color it in red/green if expected response exists</span> -<span id="L184" class="LineNr">184 </span><span class="muRecipe">after</span> <span class="Constant"><a href='005-sandbox.mu.html#L303'><render-sandbox-response></a></span> [ +<span id="L184" class="LineNr">184 </span><span class="muRecipe">after</span> <span class="Constant"><a href='005-sandbox.mu.html#L306'><render-sandbox-response></a></span> [ <span id="L185" class="LineNr">185 </span> <span class="Delimiter">{</span> <span id="L186" class="LineNr">186 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> sandbox-response <span id="L187" class="LineNr">187 </span> <span class="Conceal">¦</span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span>, row @@ -252,18 +252,18 @@ if ('onhashchange' in window) { <span id="L189" class="LineNr">189 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> expected-response <span class="Comment"># fall-through to print in grey</span> <span id="L190" class="LineNr">190 </span> <span class="Conceal">¦</span> response-is-expected?:bool <span class="Special"><-</span> equal expected-response, sandbox-response <span id="L191" class="LineNr">191 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> -<span id="L192" class="LineNr">192 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> response-is-expected?:bool -<span id="L193" class="LineNr">193 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row, <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L366'>render-text</a> <a href='../081print.mu.html#L4'>screen</a>, sandbox-response, left, right, <span class="Constant">1/red</span>, row +<span id="L192" class="LineNr">192 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> response-is-expected? +<span id="L193" class="LineNr">193 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row, <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L393'>render-text</a> <a href='../081print.mu.html#L16'>screen</a>, sandbox-response, left, right, <span class="Constant">1/red</span>, row <span id="L194" class="LineNr">194 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L195" class="LineNr">195 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L196" class="LineNr">196 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> response-is-expected?:bool -<span id="L197" class="LineNr">197 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row, <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L366'>render-text</a> <a href='../081print.mu.html#L4'>screen</a>, sandbox-response, left, right, <span class="Constant">2/green</span>, row +<span id="L197" class="LineNr">197 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row, <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L393'>render-text</a> <a href='../081print.mu.html#L16'>screen</a>, sandbox-response, left, right, <span class="Constant">2/green</span>, row <span id="L198" class="LineNr">198 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L199" class="LineNr">199 </span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+render-sandbox-end</span> <span id="L200" class="LineNr">200 </span> <span class="Delimiter">}</span> <span id="L201" class="LineNr">201 </span>] <span id="L202" class="LineNr">202 </span> -<span id="L203" class="LineNr">203 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L317'><end-render-sandbox-reset-hidden></a></span> [ +<span id="L203" class="LineNr">203 </span><span class="muRecipe">before</span> <span class="Constant"><a href='005-sandbox.mu.html#L320'><end-render-sandbox-reset-hidden></a></span> [ <span id="L204" class="LineNr">204 </span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span>,<span class="Constant"> 0</span> <span id="L205" class="LineNr">205 </span>] </pre> |