dsktool 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. data/bin/dskexplorer.rb +264 -0
  2. data/bin/dsktool.rb +34 -61
  3. data/doc/classes/AppleSoftFile.html +16 -16
  4. data/doc/classes/AppleSoftFile.src/M000020.html +18 -0
  5. data/doc/classes/AppleSoftFile.src/M000021.html +18 -0
  6. data/doc/classes/AppleSoftFile.src/M000022.html +18 -0
  7. data/doc/classes/AppleSoftFile.src/M000026.html +18 -0
  8. data/doc/classes/AppleSoftFile.src/M000027.html +18 -0
  9. data/doc/classes/AppleSoftFile.src/M000028.html +18 -0
  10. data/doc/classes/BinaryFile.html +16 -16
  11. data/doc/classes/BinaryFile.src/M000039.html +18 -0
  12. data/doc/classes/BinaryFile.src/M000040.html +18 -0
  13. data/doc/classes/BinaryFile.src/M000041.html +19 -0
  14. data/doc/classes/BinaryFile.src/M000045.html +18 -0
  15. data/doc/classes/BinaryFile.src/M000046.html +18 -0
  16. data/doc/classes/BinaryFile.src/M000047.html +19 -0
  17. data/doc/classes/CatalogServlet.html +146 -0
  18. data/doc/classes/CatalogServlet.src/M000015.html +20 -0
  19. data/doc/classes/CatalogServlet.src/M000021.html +20 -0
  20. data/doc/classes/D65.html +11 -11
  21. data/doc/classes/D65.src/M000018.html +18 -0
  22. data/doc/classes/D65.src/M000019.html +64 -0
  23. data/doc/classes/D65.src/M000024.html +18 -0
  24. data/doc/classes/D65.src/M000025.html +64 -0
  25. data/doc/classes/DOSDisk.html +16 -16
  26. data/doc/classes/DOSDisk.src/M000023.html +20 -0
  27. data/doc/classes/DOSDisk.src/M000024.html +19 -0
  28. data/doc/classes/DOSDisk.src/M000025.html +76 -0
  29. data/doc/classes/DOSDisk.src/M000029.html +20 -0
  30. data/doc/classes/DOSDisk.src/M000030.html +19 -0
  31. data/doc/classes/DOSDisk.src/M000031.html +76 -0
  32. data/doc/classes/DOSFile.html +32 -17
  33. data/doc/classes/DOSFile.src/M000042.html +22 -0
  34. data/doc/classes/DOSFile.src/M000043.html +18 -0
  35. data/doc/classes/DOSFile.src/M000044.html +18 -0
  36. data/doc/classes/DOSFile.src/M000048.html +22 -0
  37. data/doc/classes/DOSFile.src/M000049.html +18 -0
  38. data/doc/classes/DOSFile.src/M000050.html +18 -0
  39. data/doc/classes/DOSFile.src/M000051.html +31 -0
  40. data/doc/classes/DSK.html +54 -36
  41. data/doc/classes/DSK.src/M000027.html +18 -0
  42. data/doc/classes/DSK.src/M000028.html +22 -0
  43. data/doc/classes/DSK.src/M000029.html +22 -0
  44. data/doc/classes/DSK.src/M000030.html +34 -0
  45. data/doc/classes/DSK.src/M000031.html +19 -0
  46. data/doc/classes/DSK.src/M000032.html +18 -0
  47. data/doc/classes/DSK.src/M000033.html +18 -0
  48. data/doc/classes/DSK.src/M000034.html +22 -0
  49. data/doc/classes/DSK.src/M000035.html +22 -0
  50. data/doc/classes/DSK.src/M000036.html +34 -0
  51. data/doc/classes/DSK.src/M000037.html +19 -0
  52. data/doc/classes/DSK.src/M000038.html +18 -0
  53. data/doc/classes/DSK.src/M000039.html +40 -0
  54. data/doc/classes/DSK.src/M000040.html +23 -0
  55. data/doc/classes/DirectoryServlet.html +146 -0
  56. data/doc/classes/DirectoryServlet.src/M000017.html +20 -0
  57. data/doc/classes/DirectoryServlet.src/M000023.html +20 -0
  58. data/doc/classes/IntegerBasicFile.html +16 -16
  59. data/doc/classes/IntegerBasicFile.src/M000012.html +18 -0
  60. data/doc/classes/IntegerBasicFile.src/M000013.html +18 -0
  61. data/doc/classes/IntegerBasicFile.src/M000014.html +18 -0
  62. data/doc/classes/IntegerBasicFile.src/M000018.html +18 -0
  63. data/doc/classes/IntegerBasicFile.src/M000019.html +18 -0
  64. data/doc/classes/IntegerBasicFile.src/M000020.html +18 -0
  65. data/doc/classes/RDoc.html +6 -6
  66. data/doc/classes/RDoc.src/M000048.html +40 -0
  67. data/doc/classes/RDoc.src/M000055.html +40 -0
  68. data/doc/classes/SCAsmFile.html +21 -21
  69. data/doc/classes/SCAsmFile.src/M000035.html +18 -0
  70. data/doc/classes/SCAsmFile.src/M000036.html +18 -0
  71. data/doc/classes/SCAsmFile.src/M000037.html +18 -0
  72. data/doc/classes/SCAsmFile.src/M000038.html +36 -0
  73. data/doc/classes/SCAsmFile.src/M000041.html +18 -0
  74. data/doc/classes/SCAsmFile.src/M000042.html +18 -0
  75. data/doc/classes/SCAsmFile.src/M000043.html +18 -0
  76. data/doc/classes/SCAsmFile.src/M000044.html +36 -0
  77. data/doc/classes/ShowFileServlet.html +146 -0
  78. data/doc/classes/ShowFileServlet.src/M000026.html +21 -0
  79. data/doc/classes/ShowFileServlet.src/M000032.html +22 -0
  80. data/doc/classes/TestDOSDisks.html +41 -26
  81. data/doc/classes/TestDOSDisks.src/M000006.html +24 -0
  82. data/doc/classes/TestDOSDisks.src/M000007.html +19 -0
  83. data/doc/classes/TestDOSDisks.src/M000008.html +19 -0
  84. data/doc/classes/TestDOSDisks.src/M000009.html +25 -0
  85. data/doc/classes/TestDOSDisks.src/M000010.html +41 -0
  86. data/doc/classes/TestDOSDisks.src/M000011.html +27 -0
  87. data/doc/classes/TestDOSDisks.src/M000012.html +24 -0
  88. data/doc/classes/TestDOSDisks.src/M000013.html +19 -0
  89. data/doc/classes/TestDOSDisks.src/M000014.html +19 -0
  90. data/doc/classes/TestDOSDisks.src/M000015.html +25 -0
  91. data/doc/classes/TestDOSDisks.src/M000016.html +41 -0
  92. data/doc/classes/TestDOSDisks.src/M000017.html +27 -0
  93. data/doc/classes/TestDisassembly.html +6 -6
  94. data/doc/classes/TestDisassembly.src/M000016.html +19 -0
  95. data/doc/classes/TestDisassembly.src/M000022.html +19 -0
  96. data/doc/classes/TextFile.html +16 -16
  97. data/doc/classes/TextFile.src/M000045.html +18 -0
  98. data/doc/classes/TextFile.src/M000046.html +18 -0
  99. data/doc/classes/TextFile.src/M000047.html +20 -0
  100. data/doc/classes/TextFile.src/M000052.html +18 -0
  101. data/doc/classes/TextFile.src/M000053.html +18 -0
  102. data/doc/classes/TextFile.src/M000054.html +20 -0
  103. data/doc/created.rid +1 -1
  104. data/doc/dot/f_0.dot +44 -16
  105. data/doc/dot/f_0.png +0 -0
  106. data/doc/dot/f_1.dot +1 -10
  107. data/doc/dot/f_1.png +0 -0
  108. data/doc/dot/f_2.dot +4 -13
  109. data/doc/dot/f_2.png +0 -0
  110. data/doc/dot/f_3.dot +8 -64
  111. data/doc/dot/f_3.png +0 -0
  112. data/doc/dot/f_4.dot +69 -4
  113. data/doc/dot/f_4.png +0 -0
  114. data/doc/dot/f_5.dot +4 -13
  115. data/doc/dot/f_5.png +0 -0
  116. data/doc/dot/f_6.dot +15 -17
  117. data/doc/dot/f_6.png +0 -0
  118. data/doc/dot/f_7.dot +19 -1
  119. data/doc/dot/f_7.png +0 -0
  120. data/doc/dot/f_8.dot +32 -0
  121. data/doc/dot/f_8.png +0 -0
  122. data/doc/dot/f_9.dot +14 -0
  123. data/doc/dot/f_9.png +0 -0
  124. data/doc/dot/m_6_0.dot +30 -0
  125. data/doc/dot/m_6_0.png +0 -0
  126. data/doc/files/bin/dskexplorer_rb.html +339 -0
  127. data/doc/files/bin/dskexplorer_rb.src/M000001.html +21 -0
  128. data/doc/files/bin/dskexplorer_rb.src/M000002.html +21 -0
  129. data/doc/files/bin/dskexplorer_rb.src/M000003.html +22 -0
  130. data/doc/files/bin/dskexplorer_rb.src/M000004.html +19 -0
  131. data/doc/files/bin/dskexplorer_rb.src/M000005.html +20 -0
  132. data/doc/files/bin/dskexplorer_rb.src/M000006.html +22 -0
  133. data/doc/files/bin/dskexplorer_rb.src/M000007.html +20 -0
  134. data/doc/files/bin/dskexplorer_rb.src/M000008.html +43 -0
  135. data/doc/files/bin/dskexplorer_rb.src/M000009.html +55 -0
  136. data/doc/files/bin/dskexplorer_rb.src/M000010.html +43 -0
  137. data/doc/files/bin/dskexplorer_rb.src/M000011.html +34 -0
  138. data/doc/files/bin/dskserver_rb.html +247 -0
  139. data/doc/files/bin/dskserver_rb.src/M000001.html +22 -0
  140. data/doc/files/bin/dskserver_rb.src/M000002.html +19 -0
  141. data/doc/files/bin/dskserver_rb.src/M000003.html +62 -0
  142. data/doc/files/bin/dskserver_rb.src/M000004.html +39 -0
  143. data/doc/files/bin/dskserver_rb.src/M000005.html +26 -0
  144. data/doc/files/bin/dsktool_rb.html +8 -5
  145. data/doc/files/lib/D65_rb.html +1 -1
  146. data/doc/files/lib/DOSDisk_rb.html +2 -2
  147. data/doc/files/lib/DOSFile_rb.html +2 -2
  148. data/doc/files/lib/DSK_rb.html +2 -2
  149. data/doc/files/lib/rdoc_patch_rb.html +114 -0
  150. data/doc/files/test/tc_disassembly_rb.html +1 -1
  151. data/doc/files/test/tc_dos_disks_rb.html +2 -2
  152. data/doc/files/test/ts_test_all_rb.html +1 -1
  153. data/doc/fr_class_index.html +3 -0
  154. data/doc/fr_file_index.html +2 -0
  155. data/doc/fr_method_index.html +55 -38
  156. data/doc/index.html +1 -1
  157. data/doc/rdoc-style.css +208 -0
  158. data/lib/DOSDisk.rb +2 -2
  159. data/lib/DOSFile.rb +21 -3
  160. data/lib/DSK.rb +6 -1
  161. data/lib/rdoc_patch.rb +32 -0
  162. data/test/tc_dos_disks.rb +13 -2
  163. data/test/white_11a.dsk +0 -0
  164. 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">&quot;file.dsk&quot;</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">&quot;file.DSK&quot;</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">&quot;file.dsk.gz&quot;</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">&quot;file.po&quot;</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">&quot;file.po.gz&quot;</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">&quot;file.dsk.zip&quot;</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">&quot;short file should throw an error&quot;</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;0&quot;</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">&quot;non existant file should throw an error&quot;</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value str">&quot;NonExistantFileName.not&quot;</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">&quot;empty DSK should not be DOS 3.3 format&quot;</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">&quot;http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/games/adventure/vaults_of_zurich.dsk.gz&quot;</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">&quot;#{dskname} should be DOS 3.3 format&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</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">&quot;HELLO&quot;</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">&quot;#{dskname} should have a file called HELLO&quot;</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">&quot;HELLO should be an AppleSoft file&quot;</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">&quot;//dos33_with_adt.dsk&quot;</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">&quot;#{dskname} should be DOS 3.3 format&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</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">&quot;HELLO&quot;</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">&quot;#{dskname} should have a file called HELLO&quot;</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">&quot;HELLO should be an AppleSoft file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;HELLO should have non-zero length&quot;</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">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;HELLO should start '10 REM'&quot;</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">&quot;MUFFIN&quot;</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">&quot;#{dskname} should have a file called MUFFIN&quot;</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">&quot;HELLO should be an Binary file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN should have non-zero length&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should have non-zero length&quot;</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">&quot;0803:&quot;</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should start at $803&quot;</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">&quot;APPLESOFT&quot;</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">&quot;#{dskname} should have a file called APPLESOFT&quot;</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">&quot;HELLO should be an IntegetBasic file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;APPLESOFT should have non-zero length&quot;</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">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;APPLESOFT should start '10 REM'&quot;</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">&quot;//AAL_1.DSK&quot;</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">&quot;#{dskname} should be DOS 3.3 format&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</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">&quot;MORSE CODE&quot;</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">&quot;#{dskname} should have a file called MORSE CODE&quot;</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">&quot;MORSE CODE should be an SCasm file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MORSE CODE should have non-zero length&quot;</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">&quot;MORSE CODE should start '930 .LIST OFF'&quot;</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">&quot;file.dsk&quot;</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">&quot;file.DSK&quot;</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">&quot;file.dsk.gz&quot;</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">&quot;file.po&quot;</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">&quot;file.po.gz&quot;</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">&quot;file.dsk.zip&quot;</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">&quot;short file should throw an error&quot;</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;0&quot;</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">&quot;non existant file should throw an error&quot;</span>) {<span class="ruby-identifier">dsk</span>=<span class="ruby-constant">DSK</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value str">&quot;NonExistantFileName.not&quot;</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">&quot;empty DSK should not be DOS 3.3 format&quot;</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">&quot;http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/games/adventure/vaults_of_zurich.dsk.gz&quot;</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">&quot;#{dskname} should be DOS 3.3 format&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</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">&quot;HELLO&quot;</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">&quot;#{dskname} should have a file called HELLO&quot;</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">&quot;HELLO should be an AppleSoft file&quot;</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">&quot;//dos33_with_adt.dsk&quot;</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">&quot;#{dskname} should be DOS 3.3 format&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</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">&quot;HELLO&quot;</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">&quot;#{dskname} should have a file called HELLO&quot;</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">&quot;HELLO should be an AppleSoft file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;HELLO should have non-zero length&quot;</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">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;HELLO should start '10 REM'&quot;</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">&quot;MUFFIN&quot;</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">&quot;#{dskname} should have a file called MUFFIN&quot;</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">&quot;HELLO should be an Binary file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN should have non-zero length&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should have non-zero length&quot;</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">&quot;0803:&quot;</span>,<span class="ruby-value str">&quot;MUFFIN disassembly should start at $803&quot;</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">&quot;APPLESOFT&quot;</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">&quot;#{dskname} should have a file called APPLESOFT&quot;</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">&quot;HELLO should be an IntegetBasic file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;APPLESOFT should have non-zero length&quot;</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">&quot;10 REM&quot;</span>,<span class="ruby-value str">&quot;APPLESOFT should start '10 REM'&quot;</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">&quot;//AAL_1.DSK&quot;</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">&quot;#{dskname} should be DOS 3.3 format&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-node">&quot;#{dskname} should have at least one file&quot;</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">&quot;MORSE CODE&quot;</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">&quot;#{dskname} should have a file called MORSE CODE&quot;</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">&quot;MORSE CODE should be an SCasm file&quot;</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">&gt;</span><span class="ruby-value">0</span>,<span class="ruby-value str">&quot;MORSE CODE should have non-zero length&quot;</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">&quot;MORSE CODE should start '930 .LIST OFF'&quot;</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/f_5.png" usemap="#map" border=0 alt="TopLevel">
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="#M000009">test_simple</a>&nbsp;&nbsp;
96
+ <a href="#M000022">test_simple</a>&nbsp;&nbsp;
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-M000009" class="method-detail">
119
- <a name="M000009"></a>
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/M000009.html" target="Code" class="method-signature"
123
- onclick="popupCode('TestDisassembly.src/M000009.html');return false;">
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">&quot;\x60&quot;</span>)),<span class="ruby-value str">&quot;disassembly of 0x60 should be RTS&quot;</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">&quot;\x60&quot;</span>)),<span class="ruby-value str">&quot;disassembly of 0x60 should be RTS&quot;</span>)
16
+
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -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/f_3.png" usemap="#map" border=0 alt="TopLevel">
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="#M000036">file_extension</a>&nbsp;&nbsp;
103
- <a href="#M000035">file_type</a>&nbsp;&nbsp;
104
- <a href="#M000037">to_s</a>&nbsp;&nbsp;
102
+ <a href="#M000053">file_extension</a>&nbsp;&nbsp;
103
+ <a href="#M000052">file_type</a>&nbsp;&nbsp;
104
+ <a href="#M000054">to_s</a>&nbsp;&nbsp;
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-M000036" class="method-detail">
127
- <a name="M000036"></a>
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/M000036.html" target="Code" class="method-signature"
131
- onclick="popupCode('TextFile.src/M000036.html');return false;">
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-M000035" class="method-detail">
141
- <a name="M000035"></a>
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/M000035.html" target="Code" class="method-signature"
145
- onclick="popupCode('TextFile.src/M000035.html');return false;">
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-M000037" class="method-detail">
155
- <a name="M000037"></a>
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/M000037.html" target="Code" class="method-signature"
159
- onclick="popupCode('TextFile.src/M000037.html');return false;">
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">&quot;T&quot;</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">&quot;.txt&quot;</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">&quot;&quot;</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">&quot;\n&quot;</span>)}
17
+ <span class="ruby-identifier">s</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>