More regression tests.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 26 Apr 2019 15:33:00 +0000 (11:33 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 26 Apr 2019 15:33:00 +0000 (11:33 -0400)
test/test12.chk [new file with mode: 0644]
test/test12.log [new file with mode: 0644]
test/test13.chk [new file with mode: 0644]
test/test13.log [new file with mode: 0644]

diff --git a/test/test12.chk b/test/test12.chk
new file mode 100644 (file)
index 0000000..1e0797c
--- /dev/null
@@ -0,0 +1,407 @@
+
+
+-SUPER- STAR TREK
+
+
+
+Stardate 4672.
+
+15 Klingons.
+An unknown number of Romulans.
+And one (GULP) Super-Commander.
+7 stardates.
+3 starbases in 2 - 5  1 - 4  5 - 2  
+
+The Enterprise is currently in Quadrant 7 - 4 Sector 8 - 1
+
+Good Luck!
+  YOU'LL NEED IT.
+COMMAND> # SST2K version 2.5
+# Test dilithium-crystal mining
+# recorded by esr@snark on Thu Apr 25 20:35:21 2019
+
+COMMAND> sh up
+Shields raised.
+COMMAND> 
+COMMAND> m a 7 2 10 10
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 7 - 2.
+COMMAND> 
+COMMAND> m a 4 2 5 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+Enterprise blocked by object at 2 - 9;
+Emergency stop required 125 units of energy.
+Collision detected
+
+[ANNOUNCEMENT ARRIVING...]
+
+Lt. Uhura-  "Captain, the starbase in Quadrant 1 - 4
+   reports that it is under attack and that it can
+   hold out only until stardate 4677."
+
+[ANNOUNCEMENT ARRIVING...]
+Lt. Uhura-  "Captain, Starfleet Intelligence reports
+   the Super-commander is in Quadrant 8 - 5.
+
+[ANNOUNCEMENT ARRIVING...]
+
+Message from Starfleet Command       Stardate 4674.63
+     Supernova in Quadrant 4 - 4; caution advised.
+COMMAND> 
+COMMAND> m a 1 1
+
+COMMAND> 
+COMMAND> m a 4 2 5 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 4 - 2.
+
+[ANNOUNCEMENT ARRIVING...]
+
+Message from Starfleet Command       Stardate 4676.09
+     Supernova in Quadrant 1 - 5; caution advised.
+COMMAND> 
+COMMAND> m a 1 1
+
+
+[ANNOUNCEMENT ARRIVING...]
+
+***Enterprise caught in long range tractor beam--
+Enterprise is pulled to Quadrant 5 - 8, Sector 2 - 5
+
+Enemy attack reduces shield strength to 85%,   torpedoes left 10
+COMMAND> torp 2 10 10 5 8
+
+Track for torpedo number 1-  3 - 6   4 - 6   5 - 7   
+6 - 8   7 - 8   8 - 9   9 - 10   10 - 10   
+
+***Tholian at Sector 10 - 10 disappears.
+
+Track for torpedo number 2-  3 - 6   4 - 7   5 - 8   
+***Commander at Sector 5 - 8 damaged-- displaced by blast to Sector 3 - 5 
+***Internal error: Tholian in a bad spot.
+
+36 unit hit from Klingon at 3 - 5
+
+
+Energy left 2694    shields up 78%,   torpedoes left 8
+COMMAND> torp 1 3 5
+
+Torpedo track- 3 - 5   
+***Commander at Sector 3 - 5 destroyed.
+***Internal error: Tholian in a bad spot.
+COMMAND> 
+COMMAND> m a 2 7 5 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+[ANNOUNCEMENT ARRIVING...]
+Lt. Uhura-  "Captain, Starfleet Intelligence reports
+   the Super-commander is in Quadrant 7 - 2.
+
+[ANNOUNCEMENT ARRIVING...]
+
+***Enterprise caught in long range tractor beam--
+Enterprise is pulled to Quadrant 1 - 4, Sector 7 - 4
+
+152 unit hit from Klingon at 8 - 6
+
+
+Energy left 2294    shields up 61%,   torpedoes left 7
+COMMAND> 
+COMMAND> p a
+
+Weapons Officer Sulu-  "High-speed shield control enabled, sir."
+Phasers locked on target. Energy available: 2094.73
+581 units required. Units to fire= 581
+
+Shields lowered.
+
+444 unit hit on Commander at Sector 8 - 6
+***Commander at Sector 8 - 6 destroyed.
+
+Shields raised.
+COMMAND> m a 44
+
+Beg your pardon, Captain?
+COMMAND> m a 4 4
+
+COMMAND> m a 4 9
+
+
+[ANNOUNCEMENT ARRIVING...]
+
+Message from Starfleet Command       Stardate 4676.85
+     Supernova in Quadrant 4 - 7; caution advised.
+COMMAND> d
+Docked.
+COMMAND> 
+COMMAND> m a 1 2 5 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+[ANNOUNCEMENT ARRIVING...]
+
+***Enterprise caught in long range tractor beam--
+Enterprise is pulled to Quadrant 3 - 4, Sector 2 - 10
+
+108 unit hit from Klingon at 2 - 8
+
+130 unit hit from Klingon at 4 - 9
+
+66 unit hit from Klingon at 4 - 5
+
+66 unit hit from Klingon at 6 - 5
+
+
+Energy left 4426    shields up 50%,   torpedoes left 10
+COMMAND> 
+COMMAND> 
+COMMAND> torp 3 2 8 1 10 4 9
+
+Track for torpedo number 1-  2 - 9   2 - 8   
+***Commander at Sector 2 - 8 damaged-- displaced by blast to Sector 3 - 9 
+
+Track for torpedo number 2-  1 - 10   
+***Klingon at Sector 1 - 10 destroyed.
+
+Track for torpedo number 3-  3 - 9   
+***Commander at Sector 3 - 9 destroyed.
+
+132 unit hit from Klingon at 4 - 9
+
+48 unit hit from Klingon at 4 - 5
+
+60 unit hit from Klingon at 6 - 5
+
+
+Energy left 4185    shields up 43%,   torpedoes left 7
+COMMAND> p a
+
+Weapons Officer Sulu-  "High-speed shield control enabled, sir."
+Phasers locked on target. Energy available: 3985.24
+639 units required. Units to fire= 539
+
+Shields lowered.
+
+176 unit hit on Klingon at Sector 4 - 9
+***Klingon at Sector 4 - 9 destroyed.
+140 unit hit on Klingon at Sector 4 - 5
+***Klingon at Sector 4 - 5 destroyed.
+190 expended on empty space.
+
+Shields raised.
+
+32 unit hit from Klingon at 6 - 5
+
+
+Energy left 3413    shields up 42%,   torpedoes left 7
+COMMAND> m a 2 5
+
+
+37 unit hit from Klingon at 6 - 5
+
+
+Energy left 3375    shields up 41%,   torpedoes left 7
+COMMAND> torp 1 6 5
+
+Torpedo track- 3 - 5   4 - 5   5 - 5   
+6 - 5   
+***Klingon at Sector 6 - 5 destroyed.
+COMMAND> 
+COMMAND> m a 2 5 5 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 2 - 5.
+COMMAND> orbit
+
+Helmsman Sulu-  "Entering standard orbit, Sir."
+Sulu-  "Entered orbit at altitude 5580.11 kilometers."
+COMMAND> beam
+LEGAL COMMANDS ARE:
+SRSCAN       STATUS       REQUEST      LRSCAN       
+PHASERS      TORPEDO      PHOTONS      MOVE         SHIELDS      
+DOCK         DAMAGES      CHART        IMPULSE      REST         
+WARP         SENSORS      ORBIT        TRANSPORT    MINE         
+CRYSTALS     SHUTTLE      PLANETS      REPORT       COMPUTER     
+COMMANDS     EMEXIT       PROBE        SAVE         FREEZE       
+ABANDON      DESTRUCT     DEATHRAY     CAPTURE      CLOAK        
+DEBUG        MAYDAY       SOS          CALL         QUIT         
+HELP         SCORE        CURSES                    
+COMMAND> mine
+
+Mining party not on planet.
+COMMAND> transport
+
+Impossible to transport through shields.
+COMMAND> sh down
+Shields lowered.
+COMMAND> transport
+
+Spock-  "Captain, we have no information on this planet
+  and Starfleet Regulations clearly state that in this situation
+  you may not go down."
+COMMAND> mine
+
+Mining party not on planet.
+COMMAND> transport
+
+Spock-  "Captain, we have no information on this planet
+  and Starfleet Regulations clearly state that in this situation
+  you may not go down."
+COMMAND> m a 2 5
+
+Helmsman Sulu- "Leaving standard orbit."
+
+[ANNOUNCEMENT ARRIVING...]
+
+Message from Starfleet Command       Stardate 4678.15
+     Supernova in Quadrant 7 - 3; caution advised.
+COMMAND> m a 2 7
+
+COMMAND> dock
+Docked.
+COMMAND> 
+COMMAND> sh up
+Shields raised.
+COMMAND> 
+COMMAND> m a 2 6 5 1
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 2 - 6.
+
+Enemy attack reduces shield strength to 77%,   torpedoes left 10
+
+47 unit hit from Klingon at 3 - 1
+
+30 unit hit from Klingon at 9 - 3
+
+36 unit hit from Klingon at 10 - 6
+
+28 unit hit from Klingon at 3 - 8
+
+
+Energy left 4856    shields up 63%,   torpedoes left 10
+
+[ANNOUNCEMENT ARRIVING...]
+
+Message from Starfleet Command       Stardate 4678.29
+     Supernova in Quadrant 1 - 4; caution advised.
+COMMAND> torp 3 7 4 9 3 10 6
+
+Track for torpedo number 1-  6 - 2   6 - 3   7 - 4   
+Star at Sector 7 - 4 novas.
+
+Track for torpedo number 2-  6 - 2   7 - 2   8 - 3   
+9 - 3   
+***Klingon at Sector 9 - 3 destroyed.
+
+Track for torpedo number 3-  6 - 2   7 - 3   8 - 4   
+9 - 5   10 - 6   
+***Klingon at Sector 10 - 6 destroyed.
+
+57 unit hit from Klingon at 3 - 1
+
+24 unit hit from Klingon at 2 - 9
+
+
+Energy left 4650    shields up 57%,   torpedoes left 7
+COMMAND> p a
+
+Weapons Officer Sulu-  "High-speed shield control enabled, sir."
+Phasers locked on target. Energy available: 4450.23
+601 units required. Units to fire= 439
+
+Shields lowered.
+
+85 unit hit on Klingon at Sector 3 - 1
+***Klingon at Sector 3 - 1 destroyed.
+155 unit hit on Klingon at Sector 3 - 8
+***Klingon at Sector 3 - 8 destroyed.
+107 expended on empty space.
+
+Shields raised.
+
+Enemy attack reduces shield strength to 57%,   torpedoes left 7
+COMMAND> p a
+
+Weapons Officer Sulu-  "High-speed shield control enabled, sir."
+Phasers locked on target. Energy available: 3811.23
+203 units required. Units to fire= 140
+
+Shields lowered.
+
+124 unit hit on Klingon at Sector 2 - 9
+***Klingon at Sector 2 - 9 destroyed.
+
+Shields raised.
+COMMAND> 
+COMMAND> m a 2 5 5 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 2 - 5.
+COMMAND> m a 2 7
+
+COMMAND> d
+Enterprise not adjacent to base.
+COMMAND> m a 10 5
+
+
+***RED ALERT!  RED ALERT!
+***Enterprise pulled into black hole at Sector 5 - 6
+
+
+It is stardate 4678.8.
+
+Your ship is drawn to the center of the black hole.
+You are crushed into extremely dense matter.
+As a result of your actions, a treaty with the Klingon
+Empire has been signed. The terms of the treaty are
+highly unfavorable to the Federation.
+
+
+Your score --
+     9 ordinary Klingons destroyed           90
+     3 Klingon commanders destroyed         150
+  2.04 Klingons per stardate               1020
+     1 stars destroyed by your action        -5
+     1 ship(s) lost or destroyed           -100
+Penalty for getting yourself killed        -200
+
+TOTAL SCORE                                 955
+Collision detected
+[CONTINUE?]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+May the Great Bird of the Galaxy roost upon your home planet.
diff --git a/test/test12.log b/test/test12.log
new file mode 100644 (file)
index 0000000..8dee682
--- /dev/null
@@ -0,0 +1,97 @@
+# seed 1556238921
+# options regular short good fancy
+# SST2K version 2.5
+# Test dilithium-crystal mining
+# recorded by esr@snark on Thu Apr 25 20:35:21 2019
+
+sh up
+
+m a 7 2 10 10
+
+m a 4 2 5 5
+
+m a 1 1
+
+m a 4 2 5 5
+
+m a 1 1
+torp 2 10 10 5 8
+torp 1 3 5
+
+m a 2 7 5 5
+
+p a
+581
+m a 44
+m a 4 4
+m a 4 9
+d
+
+m a 1 2 5 5
+
+
+torp 3 2 8 1 10 4 9
+p a
+539
+m a 2 5
+torp 1 6 5
+
+m a 2 5 5 5
+orbit
+beam
+mine
+transport
+sh down
+transport
+mine
+transport
+m a 2 5
+m a 2 7
+dock
+
+sh up
+
+m a 2 6 5 1
+torp 3 7 4 9 3 10 6
+p a
+439
+p a
+140
+
+m a 2 5 5 5
+m a 2 7
+d
+m a 10 5
+torp 1 10 10
+
+m a 5 5 1 1
+
+m a 1 2 10 10
+
+sh down
+
+m a 6 7 10 10
+
+sh up
+
+m a 7 7 1 5
+
+torp 3 1 10 1 2 9 2
+
+m a 2 8 5 1
+
+m a 3 2 1 10
+
+m a 3 2 1 10
+sh down
+
+m a 2 5 5 5
+m a 3 6
+d
+
+sh up
+
+m a 3 2 1 10
+torp 2 6 9
+
+n
diff --git a/test/test13.chk b/test/test13.chk
new file mode 100644 (file)
index 0000000..b9b3912
--- /dev/null
@@ -0,0 +1,299 @@
+
+
+-SUPER- STAR TREK
+
+
+
+Stardate 2535.
+
+14 Klingons.
+An unknown number of Romulans.
+And one (GULP) Super-Commander.
+7 stardates.
+3 starbases in 5 - 1  6 - 3  3 - 5  
+
+The Enterprise is currently in Quadrant 2 - 2 Sector 7 - 3
+
+Good Luck!
+  YOU'LL NEED IT.
+COMMAND> # SST2K version 2.5
+# Test multiple critical hits ending in defeat by Supercommander
+# recorded by esr@snark on Fri Apr 26 11:21:47 2019
+torp 3 7 4 8 4 9 2
+
+Track for torpedo number 1-  7 - 4   
+***Klingon at Sector 7 - 4 destroyed.
+
+Track for torpedo number 2-  8 - 4   
+***Klingon at Sector 8 - 4 destroyed.
+
+Track for torpedo number 3-  8 - 3   9 - 2   
+***Klingon at Sector 9 - 2 destroyed.
+
+38 unit hit from Klingon at 4 - 9
+
+
+Energy left 4961    shields up 76%,   torpedoes left 7
+COMMAND> 
+COMMAND> torp 3 6 6 8 10 10 8
+
+Track for torpedo number 1-  7 - 4   6 - 5   6 - 6   
+***Klingon at Sector 6 - 6 destroyed.
+
+Track for torpedo number 2-  7 - 4   7 - 5   8 - 6   
+8 - 7   8 - 8   8 - 9   8 - 10   
+***Klingon at Sector 8 - 10 destroyed.
+
+Track for torpedo number 3-  8 - 4   8 - 5   9 - 6   
+9 - 7   10 - 8   
+***Klingon at Sector 10 - 8 destroyed.
+
+70 unit hit from Klingon at 4 - 9
+
+
+Energy left 4890    shields up 69%,   torpedoes left 4
+COMMAND> 
+COMMAND> p a
+
+Weapons Officer Sulu-  "High-speed shield control enabled, sir."
+Phasers locked on target. Energy available: 4690.82
+764 units required. Units to fire= 754
+
+Shields lowered.
+
+442 unit hit on Commander at Sector 4 - 9
+***Commander at Sector 4 - 9 destroyed.
+
+Shields raised.
+COMMAND> 
+COMMAND> sh down
+Shields lowered.
+COMMAND> m a 7 7
+
+COMMAND> m a 1 7
+
+COMMAND> sh up
+Shields raised.
+COMMAND> m a 1 2 10 7
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 1 - 2.
+
+157 unit hit from Klingon at 7 - 4
+
+
+Energy left 3604    shields up 58%,   torpedoes left 4
+
+185 unit hit from Klingon at 7 - 4
+
+
+Energy left 3419    shields up 49%,   torpedoes left 4
+COMMAND> torp 1 7 4
+
+Torpedo track- 9 - 6   8 - 5   7 - 4   
+***Commander at Sector 7 - 4 destroyed.
+COMMAND> 
+COMMAND> rep
+You were playing a short good game.
+Your secret password is "fgy"
+8 of 14 Klingons have been killed, including 2 Commanders.
+The Super Commander has not been destroyed.
+There are 3 bases.
+No Starbase is currently under attack.
+You have 4 deep space probes.
+
+COMMAND> 
+COMMAND> m a 5 2 1 1
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 5 - 2.
+Uhura- Captain, Medusa in Quadrant 6 - 2 reports it is under attack
+by a Klingon invasion fleet.
+COMMAND> 
+COMMAND> sh down 
+Shields lowered.
+COMMAND> m a 10 5
+
+
+[ANNOUNCEMENT ARRIVING...]
+
+Message from Starfleet Command       Stardate 2537.73
+     Supernova in Quadrant 4 - 3; caution advised.
+
+[ANNOUNCEMENT ARRIVING...]
+Lt. Uhura-  "Captain, Starfleet Intelligence reports
+   a planet in Quadrant 7 - 6 has been destroyed
+   by the Super-commander."
+COMMAND> sh up
+Shields raised.
+COMMAND> 
+COMMAND> m a 6 2 1 5
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 6 - 2.
+
+333 unit hit from Klingon at 3 - 3
+
+***CRITICAL HIT--Cloaking Device damaged.
+
+Energy left 2098    shields up 39%,   torpedoes left 3
+
+321 unit hit from Klingon at 3 - 3
+
+***CRITICAL HIT--Phasers damaged.
+
+Energy left 1776    shields up 32%,   torpedoes left 3
+
+[ANNOUNCEMENT ARRIVING...]
+
+***Enterprise caught in long range tractor beam--
+Enterprise is pulled to Quadrant 7 - 6, Sector 3 - 10
+
+670 unit hit from Klingon at 3 - 7
+
+***CRITICAL HIT--Warp Engines and Photon Tubes damaged.
+[CONTINUE?]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Energy left 1081    shields up 22%,   torpedoes left 3
+
+Mc Coy-  "Sickbay to bridge.  We suffered 8 casualties
+   in that last attack."
+COMMAND> torp 1 3 7
+Photon tubes damaged.
+COMMAND> p a
+
+Phaser control damaged.
+COMMAND> chart
+       STAR CHART FOR THE KNOWN GALAXY
+      1    2    3    4    5    6    7    8
+1 | ..2  ..4  ..8  ...  ...  ...  ...  ...   |
+2 | ..1  ..6  ..2  ...  ...  ...  ...  ...   |
+3 | ..7  ..4  ..6  ...  .1.  ...  ...  ...   |
+4 | ..6  ..9  ***  ...  ...  ...  ...  ...   |
+5 | .14  ..8  ..7  ...  ...  ...  ...  ...   |
+6 | ..2  106  312  ...  ..6  ..1  ..2  ...   |
+7 | ..8  ..4  ..1  ...  ..4 <101> ..7  ...   |
+8 | ...  ...  ...  ...  ..3  ..9  ..9  ...   |
+
+COMMAND> m a 1 1
+
+Engineer Scott- "Sorry, Captain. Until this damage
+  is repaired, I can only give you warp 4."
+COMMAND> warp 4
+Helmsman Sulu- "Warp factor 4, Captain."
+COMMAND> m a 6 6 10 10
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 6 - 6.
+
+[ANNOUNCEMENT ARRIVING...]
+
+***Enterprise caught in long range tractor beam--
+Enterprise is pulled to Quadrant 7 - 6, Sector 10 - 5
+
+252 unit hit from Klingon at 2 - 5
+
+***CRITICAL HIT--Shields damaged.
+***Shields knocked down.
+
+Energy left 790    shields damaged, 20%,   torpedoes left 3
+
+Mc Coy-  "Sickbay to bridge.  We suffered 2 casualties
+   in that last attack."
+COMMAND> p a
+
+Phaser control damaged.
+COMMAND> torp
+Photon tubes damaged.
+COMMAND> m a 8 6 1 1
+
+Ensign Chekov- "Course laid in, Captain."
+
+Entering Quadrant 8 - 6.
+
+[ANNOUNCEMENT ARRIVING...]
+
+***Enterprise caught in long range tractor beam--
+Enterprise is pulled to Quadrant 7 - 6, Sector 5 - 7
+(Shields not currently useable.)
+
+805 unit hit from Klingon at 10 - 7
+
+***CRITICAL HIT--Shuttle Craft and L. R. Sensors damaged.
+
+
+
+It is stardate 2538.5.
+
+The Enterprise has been destroyed in battle.
+
+Dulce et decorum est pro patria mori.
+As a result of your actions, a treaty with the Klingon
+Empire has been signed. The terms of the treaty are
+highly unfavorable to the Federation.
+[CONTINUE?]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Your score --
+     6 ordinary Klingons destroyed           60
+     2 Klingon commanders destroyed         100
+  3.10 Klingons per stardate               1549
+    10 casualties incurred                  -10
+     1 ship(s) lost or destroyed           -100
+Penalty for getting yourself killed        -200
+
+TOTAL SCORE                                1396
+
+May the Great Bird of the Galaxy roost upon your home planet.
diff --git a/test/test13.log b/test/test13.log
new file mode 100644 (file)
index 0000000..2c35bc6
--- /dev/null
@@ -0,0 +1,38 @@
+# seed 1556292107
+# options regular short good fancy
+# SST2K version 2.5
+# Test multiple critical hits ending in defeat by Supercommander
+# recorded by esr@snark on Fri Apr 26 11:21:47 2019
+torp 3 7 4 8 4 9 2
+
+torp 3 6 6 8 10 10 8
+
+p a
+754
+
+sh down
+m a 7 7
+m a 1 7
+sh up
+m a 1 2 10 7
+torp 1 7 4
+
+rep
+
+m a 5 2 1 1
+
+sh down 
+m a 10 5
+sh up
+
+m a 6 2 1 5
+torp 1 3 7
+p a
+chart
+m a 1 1
+warp 4
+m a 6 6 10 10
+p a
+torp
+m a 8 6 1 1
+n