blob: 3213a549b3f8302c04ac3466b4f884e03f564308 (
plain) (
tree)
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>~/Desktop/s/mu/073scenario_screen_test.mu</title>
<meta name="Generator" content="Vim/7.4">
<meta name="plugin-version" content="vim7.4_v1">
<meta name="syntax" content="none">
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
<meta name="colorscheme" content="minimal">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #d0d0d0; background-color: #000000; }
body { font-family: monospace; color: #d0d0d0; background-color: #000000; }
* { font-size: 1em; }
.Comment { color: #8080ff; }
.Constant { color: #008080; }
.Special { color: #ff6060; }
-->
</style>
<script type='text/javascript'>
<!--
-->
</script>
</head>
<body>
<pre id='vimCodeElement'>
<span class="Comment"># To check our support for screens in scenarios, rewrite tests from print.mu</span>
scenario print-character-at-top-left2 [
assume-screen <span class="Constant">3:literal/width</span>, <span class="Constant">2:literal/height</span>
run [
screen:address<span class="Special"> <- </span>print-character screen:address, <span class="Constant">97:literal</span> <span class="Comment"># 'a'</span>
]
screen-should-contain [
<span class="Constant"> .a .</span>
<span class="Constant"> . .</span>
]
]
scenario clear-line-erases-printed-characters2 [
assume-screen <span class="Constant">5:literal/width</span>, <span class="Constant">3:literal/height</span>
run [
<span class="Comment"># print a character</span>
screen:address<span class="Special"> <- </span>print-character screen:address, <span class="Constant">97:literal</span> <span class="Comment"># 'a'</span>
<span class="Comment"># move cursor to start of line</span>
screen:address<span class="Special"> <- </span>move-cursor screen:address, <span class="Constant">0:literal/row</span>, <span class="Constant">0:literal/column</span>
<span class="Comment"># clear line</span>
screen:address<span class="Special"> <- </span>clear-line screen:address
]
screen-should-contain [
<span class="Constant"> . .</span>
<span class="Constant"> . .</span>
<span class="Constant"> . .</span>
]
]
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->
|