dsktool 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/dskexplorer.rb +264 -0
- data/bin/dsktool.rb +34 -61
- data/doc/classes/AppleSoftFile.html +16 -16
- data/doc/classes/AppleSoftFile.src/M000020.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000021.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000022.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000026.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000027.html +18 -0
- data/doc/classes/AppleSoftFile.src/M000028.html +18 -0
- data/doc/classes/BinaryFile.html +16 -16
- data/doc/classes/BinaryFile.src/M000039.html +18 -0
- data/doc/classes/BinaryFile.src/M000040.html +18 -0
- data/doc/classes/BinaryFile.src/M000041.html +19 -0
- data/doc/classes/BinaryFile.src/M000045.html +18 -0
- data/doc/classes/BinaryFile.src/M000046.html +18 -0
- data/doc/classes/BinaryFile.src/M000047.html +19 -0
- data/doc/classes/CatalogServlet.html +146 -0
- data/doc/classes/CatalogServlet.src/M000015.html +20 -0
- data/doc/classes/CatalogServlet.src/M000021.html +20 -0
- data/doc/classes/D65.html +11 -11
- data/doc/classes/D65.src/M000018.html +18 -0
- data/doc/classes/D65.src/M000019.html +64 -0
- data/doc/classes/D65.src/M000024.html +18 -0
- data/doc/classes/D65.src/M000025.html +64 -0
- data/doc/classes/DOSDisk.html +16 -16
- data/doc/classes/DOSDisk.src/M000023.html +20 -0
- data/doc/classes/DOSDisk.src/M000024.html +19 -0
- data/doc/classes/DOSDisk.src/M000025.html +76 -0
- data/doc/classes/DOSDisk.src/M000029.html +20 -0
- data/doc/classes/DOSDisk.src/M000030.html +19 -0
- data/doc/classes/DOSDisk.src/M000031.html +76 -0
- data/doc/classes/DOSFile.html +32 -17
- data/doc/classes/DOSFile.src/M000042.html +22 -0
- data/doc/classes/DOSFile.src/M000043.html +18 -0
- data/doc/classes/DOSFile.src/M000044.html +18 -0
- data/doc/classes/DOSFile.src/M000048.html +22 -0
- data/doc/classes/DOSFile.src/M000049.html +18 -0
- data/doc/classes/DOSFile.src/M000050.html +18 -0
- data/doc/classes/DOSFile.src/M000051.html +31 -0
- data/doc/classes/DSK.html +54 -36
- data/doc/classes/DSK.src/M000027.html +18 -0
- data/doc/classes/DSK.src/M000028.html +22 -0
- data/doc/classes/DSK.src/M000029.html +22 -0
- data/doc/classes/DSK.src/M000030.html +34 -0
- data/doc/classes/DSK.src/M000031.html +19 -0
- data/doc/classes/DSK.src/M000032.html +18 -0
- data/doc/classes/DSK.src/M000033.html +18 -0
- data/doc/classes/DSK.src/M000034.html +22 -0
- data/doc/classes/DSK.src/M000035.html +22 -0
- data/doc/classes/DSK.src/M000036.html +34 -0
- data/doc/classes/DSK.src/M000037.html +19 -0
- data/doc/classes/DSK.src/M000038.html +18 -0
- data/doc/classes/DSK.src/M000039.html +40 -0
- data/doc/classes/DSK.src/M000040.html +23 -0
- data/doc/classes/DirectoryServlet.html +146 -0
- data/doc/classes/DirectoryServlet.src/M000017.html +20 -0
- data/doc/classes/DirectoryServlet.src/M000023.html +20 -0
- data/doc/classes/IntegerBasicFile.html +16 -16
- data/doc/classes/IntegerBasicFile.src/M000012.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000013.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000014.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000018.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000019.html +18 -0
- data/doc/classes/IntegerBasicFile.src/M000020.html +18 -0
- data/doc/classes/RDoc.html +6 -6
- data/doc/classes/RDoc.src/M000048.html +40 -0
- data/doc/classes/RDoc.src/M000055.html +40 -0
- data/doc/classes/SCAsmFile.html +21 -21
- data/doc/classes/SCAsmFile.src/M000035.html +18 -0
- data/doc/classes/SCAsmFile.src/M000036.html +18 -0
- data/doc/classes/SCAsmFile.src/M000037.html +18 -0
- data/doc/classes/SCAsmFile.src/M000038.html +36 -0
- data/doc/classes/SCAsmFile.src/M000041.html +18 -0
- data/doc/classes/SCAsmFile.src/M000042.html +18 -0
- data/doc/classes/SCAsmFile.src/M000043.html +18 -0
- data/doc/classes/SCAsmFile.src/M000044.html +36 -0
- data/doc/classes/ShowFileServlet.html +146 -0
- data/doc/classes/ShowFileServlet.src/M000026.html +21 -0
- data/doc/classes/ShowFileServlet.src/M000032.html +22 -0
- data/doc/classes/TestDOSDisks.html +41 -26
- data/doc/classes/TestDOSDisks.src/M000006.html +24 -0
- data/doc/classes/TestDOSDisks.src/M000007.html +19 -0
- data/doc/classes/TestDOSDisks.src/M000008.html +19 -0
- data/doc/classes/TestDOSDisks.src/M000009.html +25 -0
- data/doc/classes/TestDOSDisks.src/M000010.html +41 -0
- data/doc/classes/TestDOSDisks.src/M000011.html +27 -0
- data/doc/classes/TestDOSDisks.src/M000012.html +24 -0
- data/doc/classes/TestDOSDisks.src/M000013.html +19 -0
- data/doc/classes/TestDOSDisks.src/M000014.html +19 -0
- data/doc/classes/TestDOSDisks.src/M000015.html +25 -0
- data/doc/classes/TestDOSDisks.src/M000016.html +41 -0
- data/doc/classes/TestDOSDisks.src/M000017.html +27 -0
- data/doc/classes/TestDisassembly.html +6 -6
- data/doc/classes/TestDisassembly.src/M000016.html +19 -0
- data/doc/classes/TestDisassembly.src/M000022.html +19 -0
- data/doc/classes/TextFile.html +16 -16
- data/doc/classes/TextFile.src/M000045.html +18 -0
- data/doc/classes/TextFile.src/M000046.html +18 -0
- data/doc/classes/TextFile.src/M000047.html +20 -0
- data/doc/classes/TextFile.src/M000052.html +18 -0
- data/doc/classes/TextFile.src/M000053.html +18 -0
- data/doc/classes/TextFile.src/M000054.html +20 -0
- data/doc/created.rid +1 -1
- data/doc/dot/f_0.dot +44 -16
- data/doc/dot/f_0.png +0 -0
- data/doc/dot/f_1.dot +1 -10
- data/doc/dot/f_1.png +0 -0
- data/doc/dot/f_2.dot +4 -13
- data/doc/dot/f_2.png +0 -0
- data/doc/dot/f_3.dot +8 -64
- data/doc/dot/f_3.png +0 -0
- data/doc/dot/f_4.dot +69 -4
- data/doc/dot/f_4.png +0 -0
- data/doc/dot/f_5.dot +4 -13
- data/doc/dot/f_5.png +0 -0
- data/doc/dot/f_6.dot +15 -17
- data/doc/dot/f_6.png +0 -0
- data/doc/dot/f_7.dot +19 -1
- data/doc/dot/f_7.png +0 -0
- data/doc/dot/f_8.dot +32 -0
- data/doc/dot/f_8.png +0 -0
- data/doc/dot/f_9.dot +14 -0
- data/doc/dot/f_9.png +0 -0
- data/doc/dot/m_6_0.dot +30 -0
- data/doc/dot/m_6_0.png +0 -0
- data/doc/files/bin/dskexplorer_rb.html +339 -0
- data/doc/files/bin/dskexplorer_rb.src/M000001.html +21 -0
- data/doc/files/bin/dskexplorer_rb.src/M000002.html +21 -0
- data/doc/files/bin/dskexplorer_rb.src/M000003.html +22 -0
- data/doc/files/bin/dskexplorer_rb.src/M000004.html +19 -0
- data/doc/files/bin/dskexplorer_rb.src/M000005.html +20 -0
- data/doc/files/bin/dskexplorer_rb.src/M000006.html +22 -0
- data/doc/files/bin/dskexplorer_rb.src/M000007.html +20 -0
- data/doc/files/bin/dskexplorer_rb.src/M000008.html +43 -0
- data/doc/files/bin/dskexplorer_rb.src/M000009.html +55 -0
- data/doc/files/bin/dskexplorer_rb.src/M000010.html +43 -0
- data/doc/files/bin/dskexplorer_rb.src/M000011.html +34 -0
- data/doc/files/bin/dskserver_rb.html +247 -0
- data/doc/files/bin/dskserver_rb.src/M000001.html +22 -0
- data/doc/files/bin/dskserver_rb.src/M000002.html +19 -0
- data/doc/files/bin/dskserver_rb.src/M000003.html +62 -0
- data/doc/files/bin/dskserver_rb.src/M000004.html +39 -0
- data/doc/files/bin/dskserver_rb.src/M000005.html +26 -0
- data/doc/files/bin/dsktool_rb.html +8 -5
- data/doc/files/lib/D65_rb.html +1 -1
- data/doc/files/lib/DOSDisk_rb.html +2 -2
- data/doc/files/lib/DOSFile_rb.html +2 -2
- data/doc/files/lib/DSK_rb.html +2 -2
- data/doc/files/lib/rdoc_patch_rb.html +114 -0
- data/doc/files/test/tc_disassembly_rb.html +1 -1
- data/doc/files/test/tc_dos_disks_rb.html +2 -2
- data/doc/files/test/ts_test_all_rb.html +1 -1
- data/doc/fr_class_index.html +3 -0
- data/doc/fr_file_index.html +2 -0
- data/doc/fr_method_index.html +55 -38
- data/doc/index.html +1 -1
- data/doc/rdoc-style.css +208 -0
- data/lib/DOSDisk.rb +2 -2
- data/lib/DOSFile.rb +21 -3
- data/lib/DSK.rb +6 -1
- data/lib/rdoc_patch.rb +32 -0
- data/test/tc_dos_disks.rb +13 -2
- data/test/white_11a.dsk +0 -0
- metadata +134 -4
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_file_names (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_file_names</span>
|
15
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.dsk"</span>))
|
16
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.DSK"</span>))
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.dsk.gz"</span>))
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.po"</span>))
|
19
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.po.gz"</span>))
|
20
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.dsk.zip"</span>))
|
21
|
+
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_bad_dsks (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 20</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_bad_dsks</span>
|
15
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">RuntimeError</span>,<span class="ruby-value str">"short file should throw an error"</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"0"</span><span class="ruby-operator">*</span><span class="ruby-value">100</span>)}
|
16
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>,<span class="ruby-value str">"non existant file should throw an error"</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value str">"NonExistantFileName.not"</span>)}
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_empty_dsk (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 26</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_empty_dsk</span>
|
15
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>()
|
16
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-value str">"empty DSK should not be DOS 3.3 format"</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_open_url_to_compressed_dsk (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 31</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_open_url_to_compressed_dsk</span>
|
15
|
+
<span class="ruby-identifier">dskname</span>=<span class="ruby-value str">"http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/games/adventure/vaults_of_zurich.dsk.gz"</span>
|
16
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">"#{dskname} should be DOS 3.3 format"</span>)
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</span>)
|
19
|
+
|
20
|
+
<span class="ruby-identifier">hello_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"HELLO"</span>]
|
21
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called HELLO"</span>)
|
22
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">AppleSoftFile</span>),<span class="ruby-value str">"HELLO should be an AppleSoft file"</span>)
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_simple_dos_dsk (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 42</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple_dos_dsk</span>
|
15
|
+
<span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"//dos33_with_adt.dsk"</span>
|
16
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">"#{dskname} should be DOS 3.3 format"</span>)
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</span>)
|
19
|
+
|
20
|
+
<span class="ruby-identifier">hello_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"HELLO"</span>]
|
21
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called HELLO"</span>)
|
22
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">AppleSoftFile</span>),<span class="ruby-value str">"HELLO should be an AppleSoft file"</span>)
|
23
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"HELLO should have non-zero length"</span>)
|
24
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">"10 REM"</span>,<span class="ruby-value str">"HELLO should start '10 REM'"</span>)
|
25
|
+
|
26
|
+
<span class="ruby-identifier">binary_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"MUFFIN"</span>]
|
27
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called MUFFIN"</span>)
|
28
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">BinaryFile</span>),<span class="ruby-value str">"HELLO should be an Binary file"</span>)
|
29
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN should have non-zero length"</span>)
|
30
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN disassembly should have non-zero length"</span>)
|
31
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>]<span class="ruby-operator">==</span><span class="ruby-value str">"0803:"</span>,<span class="ruby-value str">"MUFFIN disassembly should start at $803"</span>)
|
32
|
+
|
33
|
+
|
34
|
+
<span class="ruby-identifier">integer_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"APPLESOFT"</span>]
|
35
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called APPLESOFT"</span>)
|
36
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">IntegerBasicFile</span>),<span class="ruby-value str">"HELLO should be an IntegetBasic file"</span>)
|
37
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"APPLESOFT should have non-zero length"</span>)
|
38
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">"10 REM"</span>,<span class="ruby-value str">"APPLESOFT should start '10 REM'"</span>)
|
39
|
+
<span class="ruby-keyword kw">end</span></pre>
|
40
|
+
</body>
|
41
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_scasm_file (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 69</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scasm_file</span>
|
15
|
+
<span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"//AAL_1.DSK"</span>
|
16
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">"#{dskname} should be DOS 3.3 format"</span>)
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</span>)
|
19
|
+
|
20
|
+
<span class="ruby-identifier">asm_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"MORSE CODE"</span>]
|
21
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called MORSE CODE"</span>)
|
22
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">SCAsmFile</span>),<span class="ruby-value str">"MORSE CODE should be an SCasm file"</span>)
|
23
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MORSE CODE should have non-zero length"</span>)
|
24
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">=~</span><span class="ruby-regexp re">/930\W*.LIST OFF/</span>).<span class="ruby-identifier">nil?</span>,<span class="ruby-value str">"MORSE CODE should start '930 .LIST OFF'"</span>)
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_file_names (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_file_names</span>
|
15
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.dsk"</span>))
|
16
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.DSK"</span>))
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.dsk.gz"</span>))
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.po"</span>))
|
19
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.po.gz"</span>))
|
20
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-constant">DSK</span>.<span class="ruby-identifier">is_dsk_file?</span>(<span class="ruby-value str">"file.dsk.zip"</span>))
|
21
|
+
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_bad_dsks (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 20</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_bad_dsks</span>
|
15
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">RuntimeError</span>,<span class="ruby-value str">"short file should throw an error"</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"0"</span><span class="ruby-operator">*</span><span class="ruby-value">100</span>)}
|
16
|
+
<span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>,<span class="ruby-value str">"non existant file should throw an error"</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value str">"NonExistantFileName.not"</span>)}
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_empty_dsk (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 26</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_empty_dsk</span>
|
15
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>()
|
16
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span><span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-value str">"empty DSK should not be DOS 3.3 format"</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_open_url_to_compressed_dsk (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 31</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_open_url_to_compressed_dsk</span>
|
15
|
+
<span class="ruby-identifier">dskname</span>=<span class="ruby-value str">"http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/games/adventure/vaults_of_zurich.dsk.gz"</span>
|
16
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">"#{dskname} should be DOS 3.3 format"</span>)
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</span>)
|
19
|
+
|
20
|
+
<span class="ruby-identifier">hello_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"HELLO"</span>]
|
21
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called HELLO"</span>)
|
22
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">AppleSoftFile</span>),<span class="ruby-value str">"HELLO should be an AppleSoft file"</span>)
|
23
|
+
<span class="ruby-keyword kw">end</span></pre>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_simple_dos_dsk (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 42</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple_dos_dsk</span>
|
15
|
+
<span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"//dos33_with_adt.dsk"</span>
|
16
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">"#{dskname} should be DOS 3.3 format"</span>)
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</span>)
|
19
|
+
|
20
|
+
<span class="ruby-identifier">hello_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"HELLO"</span>]
|
21
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called HELLO"</span>)
|
22
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">AppleSoftFile</span>),<span class="ruby-value str">"HELLO should be an AppleSoft file"</span>)
|
23
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"HELLO should have non-zero length"</span>)
|
24
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">hello_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">"10 REM"</span>,<span class="ruby-value str">"HELLO should start '10 REM'"</span>)
|
25
|
+
|
26
|
+
<span class="ruby-identifier">binary_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"MUFFIN"</span>]
|
27
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called MUFFIN"</span>)
|
28
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">BinaryFile</span>),<span class="ruby-value str">"HELLO should be an Binary file"</span>)
|
29
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN should have non-zero length"</span>)
|
30
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MUFFIN disassembly should have non-zero length"</span>)
|
31
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">binary_file</span>.<span class="ruby-identifier">disassembly</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>]<span class="ruby-operator">==</span><span class="ruby-value str">"0803:"</span>,<span class="ruby-value str">"MUFFIN disassembly should start at $803"</span>)
|
32
|
+
|
33
|
+
|
34
|
+
<span class="ruby-identifier">integer_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"APPLESOFT"</span>]
|
35
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called APPLESOFT"</span>)
|
36
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">IntegerBasicFile</span>),<span class="ruby-value str">"HELLO should be an IntegetBasic file"</span>)
|
37
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"APPLESOFT should have non-zero length"</span>)
|
38
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">integer_file</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>]<span class="ruby-operator">==</span><span class="ruby-value str">"10 REM"</span>,<span class="ruby-value str">"APPLESOFT should start '10 REM'"</span>)
|
39
|
+
<span class="ruby-keyword kw">end</span></pre>
|
40
|
+
</body>
|
41
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_scasm_file (TestDOSDisks)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_dos_disks.rb, line 69</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_scasm_file</span>
|
15
|
+
<span class="ruby-identifier">dskname</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"//AAL_1.DSK"</span>
|
16
|
+
<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">dskname</span>)
|
17
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">is_dos33?</span>,<span class="ruby-node">"#{dskname} should be DOS 3.3 format"</span>)
|
18
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-node">"#{dskname} should have at least one file"</span>)
|
19
|
+
|
20
|
+
<span class="ruby-identifier">asm_file</span>=<span class="ruby-identifier">dsk</span>.<span class="ruby-identifier">files</span>[<span class="ruby-value str">"MORSE CODE"</span>]
|
21
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file!</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-node">"#{dskname} should have a file called MORSE CODE"</span>)
|
22
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">SCAsmFile</span>),<span class="ruby-value str">"MORSE CODE should be an SCasm file"</span>)
|
23
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">></span><span class="ruby-value">0</span>,<span class="ruby-value str">"MORSE CODE should have non-zero length"</span>)
|
24
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-operator">!</span>(<span class="ruby-identifier">asm_file</span>.<span class="ruby-identifier">to_s</span><span class="ruby-operator">=~</span><span class="ruby-regexp re">/930\W*.LIST OFF/</span>).<span class="ruby-identifier">nil?</span>,<span class="ruby-value str">"MORSE CODE should start '930 .LIST OFF'"</span>)
|
25
|
+
<span class="ruby-keyword kw">end</span></pre>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -82,7 +82,7 @@
|
|
82
82
|
<area shape="RECT" coords="13,101,123,149" href="TestDisassembly.html" alt="TestDisassembly">
|
83
83
|
<area shape="RECT" coords="7,5,129,53" href="Test/Unit/TestCase.html" alt="Test::Unit::TestCase">
|
84
84
|
</map>
|
85
|
-
<img src="../dot/
|
85
|
+
<img src="../dot/f_7.png" usemap="#map" border=0 alt="TopLevel">
|
86
86
|
</div>
|
87
87
|
|
88
88
|
|
@@ -93,7 +93,7 @@
|
|
93
93
|
<h3 class="section-bar">Methods</h3>
|
94
94
|
|
95
95
|
<div class="name-list">
|
96
|
-
<a href="#
|
96
|
+
<a href="#M000022">test_simple</a>
|
97
97
|
</div>
|
98
98
|
</div>
|
99
99
|
|
@@ -115,12 +115,12 @@
|
|
115
115
|
<div id="methods">
|
116
116
|
<h3 class="section-bar">Public Instance methods</h3>
|
117
117
|
|
118
|
-
<div id="method-
|
119
|
-
<a name="
|
118
|
+
<div id="method-M000022" class="method-detail">
|
119
|
+
<a name="M000022"></a>
|
120
120
|
|
121
121
|
<div class="method-heading">
|
122
|
-
<a href="TestDisassembly.src/
|
123
|
-
onclick="popupCode('TestDisassembly.src/
|
122
|
+
<a href="TestDisassembly.src/M000022.html" target="Code" class="method-signature"
|
123
|
+
onclick="popupCode('TestDisassembly.src/M000022.html');return false;">
|
124
124
|
<span class="method-name">test_simple</span><span class="method-args">()</span>
|
125
125
|
</a>
|
126
126
|
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_simple (TestDisassembly)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_disassembly.rb, line 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple</span>
|
15
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-regexp re">/RTS/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-constant">D65</span>.<span class="ruby-identifier">disassemble</span>(<span class="ruby-value str">"\x60"</span>)),<span class="ruby-value str">"disassembly of 0x60 should be RTS"</span>)
|
16
|
+
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>test_simple (TestDisassembly)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File test/tc_disassembly.rb, line 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_simple</span>
|
15
|
+
<span class="ruby-identifier">assert</span>(<span class="ruby-regexp re">/RTS/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-constant">D65</span>.<span class="ruby-identifier">disassemble</span>(<span class="ruby-value str">"\x60"</span>)),<span class="ruby-value str">"disassembly of 0x60 should be RTS"</span>)
|
16
|
+
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
data/doc/classes/TextFile.html
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
<area shape="RECT" coords="256,5,328,53" href="DOSFile.html" alt="DOSFile">
|
89
89
|
<area shape="RECT" coords="456,101,528,149" href="TextFile.html" alt="TextFile">
|
90
90
|
</map>
|
91
|
-
<img src="../dot/
|
91
|
+
<img src="../dot/f_4.png" usemap="#map" border=0 alt="TopLevel">
|
92
92
|
</div>
|
93
93
|
|
94
94
|
|
@@ -99,9 +99,9 @@
|
|
99
99
|
<h3 class="section-bar">Methods</h3>
|
100
100
|
|
101
101
|
<div class="name-list">
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
102
|
+
<a href="#M000053">file_extension</a>
|
103
|
+
<a href="#M000052">file_type</a>
|
104
|
+
<a href="#M000054">to_s</a>
|
105
105
|
</div>
|
106
106
|
</div>
|
107
107
|
|
@@ -123,12 +123,12 @@
|
|
123
123
|
<div id="methods">
|
124
124
|
<h3 class="section-bar">Public Instance methods</h3>
|
125
125
|
|
126
|
-
<div id="method-
|
127
|
-
<a name="
|
126
|
+
<div id="method-M000053" class="method-detail">
|
127
|
+
<a name="M000053"></a>
|
128
128
|
|
129
129
|
<div class="method-heading">
|
130
|
-
<a href="TextFile.src/
|
131
|
-
onclick="popupCode('TextFile.src/
|
130
|
+
<a href="TextFile.src/M000053.html" target="Code" class="method-signature"
|
131
|
+
onclick="popupCode('TextFile.src/M000053.html');return false;">
|
132
132
|
<span class="method-name">file_extension</span><span class="method-args">()</span>
|
133
133
|
</a>
|
134
134
|
</div>
|
@@ -137,12 +137,12 @@
|
|
137
137
|
</div>
|
138
138
|
</div>
|
139
139
|
|
140
|
-
<div id="method-
|
141
|
-
<a name="
|
140
|
+
<div id="method-M000052" class="method-detail">
|
141
|
+
<a name="M000052"></a>
|
142
142
|
|
143
143
|
<div class="method-heading">
|
144
|
-
<a href="TextFile.src/
|
145
|
-
onclick="popupCode('TextFile.src/
|
144
|
+
<a href="TextFile.src/M000052.html" target="Code" class="method-signature"
|
145
|
+
onclick="popupCode('TextFile.src/M000052.html');return false;">
|
146
146
|
<span class="method-name">file_type</span><span class="method-args">()</span>
|
147
147
|
</a>
|
148
148
|
</div>
|
@@ -151,12 +151,12 @@
|
|
151
151
|
</div>
|
152
152
|
</div>
|
153
153
|
|
154
|
-
<div id="method-
|
155
|
-
<a name="
|
154
|
+
<div id="method-M000054" class="method-detail">
|
155
|
+
<a name="M000054"></a>
|
156
156
|
|
157
157
|
<div class="method-heading">
|
158
|
-
<a href="TextFile.src/
|
159
|
-
onclick="popupCode('TextFile.src/
|
158
|
+
<a href="TextFile.src/M000054.html" target="Code" class="method-signature"
|
159
|
+
onclick="popupCode('TextFile.src/M000054.html');return false;">
|
160
160
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
161
161
|
</a>
|
162
162
|
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>file_type (TextFile)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 30</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_type</span>
|
15
|
+
<span class="ruby-value str">"T"</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>file_extension (TextFile)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 34</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_extension</span>
|
15
|
+
<span class="ruby-value str">".txt"</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>to_s (TextFile)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/DOSFile.rb, line 38</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
15
|
+
<span class="ruby-identifier">s</span>=<span class="ruby-value str">""</span>
|
16
|
+
<span class="ruby-ivar">@contents</span>.<span class="ruby-identifier">each_byte</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span><span class="ruby-operator">+=</span>(<span class="ruby-identifier">b</span><span class="ruby-operator">%</span><span class="ruby-value">0x80</span>).<span class="ruby-identifier">chr</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value">0x0</span><span class="ruby-constant">D</span>.<span class="ruby-identifier">chr</span>,<span class="ruby-value str">"\n"</span>)}
|
17
|
+
<span class="ruby-identifier">s</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|