Subject: testing 1,2,3....uh err and 4.... (no, not all) From: "Timothy Rue" Date: 6 Jan 2003 18:38:15 -0500 To: Kingsley On 03-Jan-03 22:48:57 Kingsley wrote: > Timothy Rue wrote: . . >> BTW >> As a test it should be possible to write a script that contains all >> this phase of the projects, commands. > That would be an excellent testing tool. Kingsley, In my effort to write a test script I extracted all the possible command and option from the specs. >From here I broke them down into separate test files for each of the four commands and added an echo "command" (only did it to the pk command test file but intended to do it to all) before each command, to tell what command and options is being tested. Also begain inserting "command -r" to verify results, or other such verifications like "dir". Then in running one of them I expose problems, either in the script, the command syntax (replacing general description with specific info), or resulting error produced by the code. If I know a command works but don't want to include it in re-testing the test script I start it with a "!" (don't recall if there was a specific comment symbol to use) which simply causes the command to be passed to the OS shell where it fails due to no shell or OS commands starting with "!" (on the Amiga I hit ctrl-c to continue past such fails). Anyway, here is some of the output: testing the command PK (always delete rooms before next test) and because the code always crashed out, the AI.RC file was never updated. manually inserted comments (for this message) start with "#" ------------------------ Ram Disk:> python main.py 'Home/Rooms' doesn't exist already... creating NO CURSES No-VIC> AI -n test2 -sf home/command-pk.test Created 'test2.9' +++++ doing PK general set ++++ --doing---PK -? !PK: Unknown command !PK failed returncode 10 # actually help works but commented out so I don't have to close the # browser everytime I run the test - but do verify at least once for each # help option --doing---PK -s [opt path:][opt. filename] -- saved.pk --doing---PK -rn funhouse.pk --doing---PK PK -r - for verification of PK -rn ... PK: default.pk;;default.pk # PK -rn doesn't "seem" to have worked - but see below - it works but not # right - not changing the right PK file position. --doing---PK -s --------doing dir home/rooms/test2--- default.oi default.pk saved.pk # PK -s should have saved funhouse.pk but contents of default.pk indicate # PK -s worked - The SF line shows command-pk.test@12 (line 12 of file) --doing---PK -del saved.pk -- not working... Traceback (most recent call last): File "main.py", line 201, in ? state.processingEngine(state,stdscr,config,global_command_modules) File "state.py", line 261, in processingEngine self.executeCommand(this_state,self.vic_list[i],stdscr,config,command,command_modules) File "state.py", line 204, in executeCommand handled,stdout,error = command_modules[i].parseRun(this_state,vic,config,command,stdin) File "pk.py", line 70, in parseRun filename = vic.getPKRoom()+args[1] AttributeError: 'Vic' instance has no attribute 'getPKRoom' Ram Disk:> # Ok so we already knew this about "PK -del file" but including it anyway. #### without showing the same output repeatedly, to get to new output #### I clip and past from the shell only the newer stuff, starting with #### the commented out command that crashed above. . . . --doing---PK -del saved.pk -- not working... !PK: Unknown command !PK failed returncode 10 # Yep, I commented out "PK -del saved.pk" --------doing dir home/rooms/test2--- default.oi default.pk saved.pk # of course it didn't delete saved.pk ++++++ doing PK AI set +++++ --doing---PK AI -? !PK: Unknown command !PK failed returncode 10 # help still works, just commented out --doing---PK AI -r AI: test2.9;funhouse.pk;Home/Rooms/test2.9/ # ah ha!!! the position where funhouse.pk is listed should be just the # directory of where it loaded it's last loaded pk file. Changing the name # of the current file/buffer "PK -rn" or "PK -rn filename" would change # the PK:line position 1. --doing---PK AI -r1 test2.9 --doing---PK AI -r2 funhouse.pk # this sould show a directory....not a file - given the above --doing---PK AI -r3 Home/Rooms/test2.9/ --doing---PK AI -c3 Traceback (most recent call last): File "main.py", line 201, in ? state.processingEngine(state,stdscr,config,global_command_modules) File "state.py", line 261, in processingEngine self.executeCommand(this_state,self.vic_list[i],stdscr,config,command,command_modules) File "state.py", line 204, in executeCommand handled,stdout,error = command_modules[i].parseRun(this_state,vic,config,command,stdin) File "pk.py", line 144, in parseRun if (not chdirOK(vic.getRoomPath())): NameError: There is no variable named 'chdirOK' Ram Disk:> # Ok or actually not "chdirOK" :) ### next try after commenting out command causing code error . . --doing---PK AI -c3 !PK: Unknown command !PK failed returncode 10 --doing---PK AI -c3 ram:t --doing---PK AI -r AI: test2.9;funhouse.pk;ram:t ++++++ doing PK PK set ++++ --doing---PK PK -? !PK: Unknown command !PK failed returncode 10 # yes help still works - commented out --doing---PK PK -r PK: default.pk;;default.pk --doing---PK PK -c PK: line - pumpkin pumpkin.pk: ok cows.pk: ok default.pk: ok # Not really sure what is going on here - script actually is: # # echo "--doing---PK PK -c PK: line - pumpkin;default.pk;default.pk" # PK PK -c pumpkin.pk;cows.pk;default.pk # --doing---PK PK -r PK: default.pk;;default.pk # "Well PK PK -c PK:Line" didn't seem to work --doing---PK PK - toggle position 1 and 2 --doing---PK PK -r PK: default.pk;default.pk;default.pk # not sure, but suspect "PK PK" worked as defined --doing---PK PK -r1 default.pk --doing---PK PK -c1 - remove position 1 and replace it with 2 or default --doing---PK PK -r PK: default.pk;default.pk;default.pk # again not sure - would be easier to tell if "PK PK -c PK:Line" worked --doing---PK PK -c1 xmas.pk Traceback (most recent call last): File "main.py", line 201, in ? state.processingEngine(state,stdscr,config,global_command_modules) File "state.py", line 261, in processingEngine self.executeCommand(this_state,self.vic_list[i],stdscr,config,command,command_modules) File "state.py", line 204, in executeCommand handled,stdout,error = command_modules[i].parseRun(this_state,vic,config,command,stdin) File "pk.py", line 160, in parseRun error = vic.setPKFieldUserValue(args[0],args[2],field_number) File "vic.py", line 498, in setPKFieldUserValue error = loadCreatePKFile(value) NameError: There is no variable named 'loadCreatePKFile' # Ok loadCreatePKFile() problem??? ### next try --doing---PK PK -c1 xmas.pk !PK: Unknown command !PK failed returncode 10 # yep, commented out... --doing---PK PK -r PK: default.pk;default.pk;default.pk --doing---PK PK -r2 default.pk # hard to tell when everything is default.pk... --doing---PK PK -c2 - remove position 2 --doing---PK PK -r PK: default.pk;;default.pk --doing---PK PK -c2 xmas2.pk - set position 2 --doing---PK PK -r PK: default.pk;Home/Rooms/test2.9/xmas2.pk;default.pk # Ok it seems to work - not sure of fullpath needed, but.... --doing---PK PK -r3 default.pk --doing---PK PK -c3 xmas3.pk - set default position --doing---PK PK -r PK: default.pk;Home/Rooms/test2.9/xmas2.pk;Home/Rooms/test2.9/xmas3.pk # same comment as last comment --doing---PK PK -c3 - remove position 3 --doing---PK PK -r PK: default.pk;Home/Rooms/test2.9/xmas2.pk; ++++++ doing PK OI set ++++ --doing---PK OI -? # yes it worked and I didn't comment it out. --doing---PK OI -r OI: default.oi;;default.oi --doing---PK OI -c OI: default.oi;;default.oi # hard to tell if it worked, need to change it to some other name before # doing this test # at this point the test script need to be further edited in order to # output verification. like in adding PK OI -r between commands being # tested --doing---PK OI -c OI: line --doing---PK OI --doing---PK OI -r1 default.oi --doing---PK OI -c1 Traceback (most recent call last): File "main.py", line 201, in ? state.processingEngine(state,stdscr,config,global_command_modules) File "state.py", line 261, in processingEngine self.executeCommand(this_state,self.vic_list[i],stdscr,config,command,command_modules) File "state.py", line 204, in executeCommand handled,stdout,error = command_modules[i].parseRun(this_state,vic,config,command,stdin) File "pk.py", line 139, in parseRun error = vic.doPK_XX_MinusC1(args[0]) File "vic.py", line 719, in doPK_XX_MinusC1 if (not self.loadOI(path_file)): AttributeError: 'Vic' instance has no attribute 'loadOI' =================================================================== I'm going to go ahead and send this off to you. I've added what I have done test script wise. I took today off from work, in part due to needing to do something test script wise and also still suffering from a sinus headache. I would have got more done but sinuses have at this point burnt me out. I had also done a search on all files for "STUB" and found a few. Given the above (I also did some simple test on AI commands - of which I didn't record the results of) it seems there are a number of lose ends and completitions to deal with and given the rent-a-coders deadline is wednesday.... I don't want to further delay bid payment to you. So here is what I propose. I'll accept the code when the deadline comes, regardless of where things are in cleaning up lose ends and completing what STUBs should be completed. The additional bonus I said I'll give (same or better than what was an xmas bonus [rent-a-coder messed up the message I posted with the bonus - due the credit card/address problem that happened before with escrow] will still happen [bonus], but upon reasonable cleanup. Remember this is to be released GPL and as such I'm not looking for perfection. What do you think, Kingsley? Tim AI (optional VIC-HOME:)(optional PATH:) (optional -n name) AI -pk (optional VIC-HOME:)(optional PATH:)filename AI (optional VIC-HOME:)(optional PATH:)filename.pk AI -oi (optional VIC-HOME:)(optional PATH:)filename AI (optional VIC-HOME:)(optional PATH:)filename.oi AI -ip (set-options) AI -i (set-options) AI -op (set-options) AI -o (set-options) AI -f (flags) AI -sf (optional VIC-HOME:)(optional PATH:)filename(opt. @line#) AI (optional VIC-HOME:)(optional PATH:)filename.sf(opt. @line#) AI -iq (optional VIC-HOME:)(optional PATH:)filename(opt. @line#) AI (optional VIC-HOME:)(optional PATH:)filename.iq(opt. @line#) AI -id (optional VIC-HOME:)(optional PATH:)filename(opt. @line#) AI (optional VIC-HOME:)(optional PATH:)filename.id(opt. @line#) AI -ke (optional VIC-HOME:)(optional PATH:)filename AI (optional VIC-HOME:)(optional PATH:)filename.ke AI -w AI -u AI -e AI -? AI -l AI -s AI -s name/#, name/#,... AI name/#, name/#,... SF (single sf command line) AI exit (optional name/#'s) AI exits filename.vic (optional name/#'s) AI -pk DF1:Testfile script.sf -ke Holder OI OI -? OI -oi OI var OI -c var OI -c var value OI -ct var tag OI -rt var OI -ct var Echo "+++++ doing PK general set ++++" echo "--doing---PK -?" !PK -? echo "--doing---PK -s [opt path:][opt. filename] -- saved.pk" PK -s saved.pk echo "--doing---PK -rn funhouse.pk" PK -rn funhouse.pk echo "--doing---PK PK -r - for verification of PK -rn ..." PK PK -r echo "--doing---PK -s" PK -s echo "--------doing dir home/rooms/test2---" dir home/rooms/test2.9 echo "--doing---PK -del saved.pk -- not working..." !PK -del saved.pk echo "--------doing dir home/rooms/test2---" dir home/rooms/test2.9 echo"++++++ doing PK AI set +++++" echo "--doing---PK AI -?" !PK AI -? echo "--doing---PK AI -r" PK AI -r echo "--doing---PK AI -r1" PK AI -r1 echo "--doing---PK AI -r2" PK AI -r2 echo "--doing---PK AI -r3" PK AI -r3 echo "--doing---PK AI -c3" !PK AI -c3 echo "--doing---PK AI -c3 ram:t" PK AI -c3 ram:t echo "--doing---PK AI -r" PK AI -r echo "++++++ doing PK PK set ++++" echo "--doing---PK PK -?" !PK PK -? echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -c PK: line - pumpkin;default.pk;default.pk" PK PK -c pumpkin.pk;cows.pk;default.pk echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK - toggle position 1 and 2" PK PK echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -r1" PK PK -r1 echo "--doing---PK PK -c1 - remove position 1 and replace it with 2 or default" PK PK -c1 echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -c1 xmas.pk" !PK PK -c1 xmas.pk echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -r2" PK PK -r2 echo "--doing---PK PK -c2 - remove position 2" PK PK -c2 echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -c2 xmas2.pk - set position 2" PK PK -c2 xmas2.pk echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -r3" PK PK -r3 echo "--doing---PK PK -c3 xmas3.pk - set default position" PK PK -c3 xmas3.pk echo "--doing---PK PK -r" PK PK -r echo "--doing---PK PK -c3 - remove position 3" PK PK -c3 echo "--doing---PK PK -r" PK PK -r echo "++++++ doing PK OI set ++++" echo "--doing---PK OI -?" PK OI -? echo "--doing---PK OI -r" PK OI -r echo "--doing---PK OI -c" PK OI -c echo "--doing---PK OI -c OI: line" PK OI -c OI: line echo "--doing---PK OI" PK OI echo "--doing---PK OI -r1" PK OI -r1 echo "--doing---PK OI -c1" PK OI -c1 echo "--doing---PK OI -c1 OI-filename" PK OI -c1 OI-filename echo "--doing---PK OI -r2" PK OI -r2 echo "--doing---PK OI -c2" PK OI -c2 echo "--doing---PK OI -c2 OI-filename" PK OI -c2 OI-filename echo "--doing---PK OI -r3" PK OI -r3 echo "--doing---PK OI -c3" PK OI -c3 echo "--doing---PK OI -c3 OI-filename" PK OI -c3 OI-filename echo "--doing---PK IP -?" PK IP -? echo "--doing---PK IP -r" PK IP -r echo "--doing---PK IP -c" PK IP -c echo "--doing---PK IP -c IP: line" PK IP -c IP: line echo "--doing---PK IP" PK IP echo "--doing---PK IP -r1" PK IP -r1 echo "--doing---PK IP -c1" PK IP -c1 echo "--doing---PK IP -c1 stdin,,,," PK IP -c1 stdin,,,, echo "--doing---PK IP -r2" PK IP -r2 echo "--doing---PK IP -c2" PK IP -c2 echo "--doing---PK IP -c2 stdin,,,," PK IP -c2 stdin,,,, echo "--doing---PK IP -r3" PK IP -r3 echo "--doing---PK IP -c3" PK IP -c3 echo "--doing---PK IP -c3 stdin,,,," PK IP -c3 stdin,,,, echo "--doing---PK OP -?" PK OP -? echo "--doing---PK OP -r" PK OP -r echo "--doing---PK OP -c" PK OP -c echo "--doing---PK OP -c OP: line" PK OP -c OP: line echo "--doing---PK OP" PK OP echo "--doing---PK OP -r1" PK OP -r1 echo "--doing---PK OP -c1" PK OP -c1 echo "--doing---PK OP -c1 stdout,,,," PK OP -c1 stdout,,,, echo "--doing---PK OP -r2" PK OP -r2 echo "--doing---PK OP -c2" PK OP -c2 echo "--doing---PK OP -c2 stdout,,,," PK OP -c2 stdout,,,, echo "--doing---PK OP -r3" PK OP -r3 echo "--doing---PK OP -c3" PK OP -c3 echo "--doing---PK OP -c3 stdout,,,," PK OP -c3 stdout,,,, echo "--doing---PK SF -?" PK SF -? echo "--doing---PK SF -r" PK SF -r echo "--doing---PK SF -c" PK SF -c echo "--doing---PK SF -c SF: line" PK SF -c SF: line echo "--doing---PK SF" PK SF echo "--doing---PK SF -r1" PK SF -r1 echo "--doing---PK SF -c1" PK SF -c1 echo "--doing---PK SF -c1 SF-LPC flags" PK SF -c1 SF-LPC flags echo "--doing---PK SF -r2" PK SF -r2 echo "--doing---PK SF -c2" PK SF -c2 echo "--doing---PK SF -c2 SF-LPC flags" PK SF -c2 SF-LPC flags echo "--doing---PK SF -r3" PK SF -r3 echo "--doing---PK SF -c3" PK SF -c3 echo "--doing---PK SF -c3 SF-filename@2" PK SF -c3 SF-filename@2 echo "--doing---PK SF -r4" PK SF -r4 echo "--doing---PK SF -c4" PK SF -c4 echo "--doing---PK SF -c4 SF-filename@2" PK SF -c4 SF-filename@2 echo "--doing---PK IQ -?" PK IQ -? echo "--doing---PK IQ -r" PK IQ -r echo "--doing---PK IQ -c" PK IQ -c echo "--doing---PK IQ -c IQ: line" PK IQ -c IQ: line echo "--doing---PK IQ" PK IQ echo "--doing---PK IQ -r1" PK IQ -r1 echo "--doing---PK IQ -c1" PK IQ -c1 echo "--doing---PK IQ -c1 IQ flags" PK IQ -c1 IQ flags echo "--doing---PK IQ -r2" PK IQ -r2 echo "--doing---PK IQ -c2" PK IQ -c2 echo "--doing---PK IQ -c2 IQ flags" PK IQ -c2 IQ flags echo "--doing---PK IQ -r3" PK IQ -r3 echo "--doing---PK IQ -c3" PK IQ -c3 echo "--doing---PK IQ -c3 IQ-filename@4" PK IQ -c3 IQ-filename@4 echo "--doing---PK IQ -r4" PK IQ -r4 echo "--doing---PK IQ -c4" PK IQ -c4 echo "--doing---PK IQ -c4 IQ-filename@4" PK IQ -c4 IQ-filename@4 echo "--doing---PK ID -?" PK ID -? echo "--doing---PK ID -r" PK ID -r echo "--doing---PK ID -c" PK ID -c echo "--doing---PK ID -c ID: line" PK ID -c ID: line echo "--doing---PK ID" PK ID echo "--doing---PK ID -r1" PK ID -r1 echo "--doing---PK ID -c1" PK ID -c1 echo "--doing---PK ID -c1 ID flags" PK ID -c1 ID flags echo "--doing---PK ID -r2" PK ID -r2 echo "--doing---PK ID -c2" PK ID -c2 echo "--doing---PK ID -c2 ID flags" PK ID -c2 ID flags echo "--doing---PK ID -r3" PK ID -r3 echo "--doing---PK ID -c3" PK ID -c3 echo "--doing---PK ID -c3 ID-filename@3" PK ID -c3 ID-filename@3 echo "--doing---PK ID -r4" PK ID -r4 echo "--doing---PK ID -c4" PK ID -c4 echo "--doing---PK ID -c4 ID-filename@3" PK ID -c4 ID-filename@3 echo "--doing---PK KE -?" PK KE -? echo "--doing---PK KE -r" PK KE -r echo "--doing---PK KE -c" PK KE -c echo "--doing---PK KE -c [KE: line]" PK KE -c [KE: line] echo "--doing---PK KE" PK KE echo "--doing---PK KE x" PK KE x echo "--doing---PK KE -r1" PK KE -r1 echo "--doing---PK KE -c1" PK KE -c1 echo "--doing---PK KE -c1 [KE Master-Teeth]" PK KE -c1 [KE Master-Teeth] echo "--doing---PK KE -r2" PK KE -r2 echo "--doing---PK KE -c2" PK KE -c2 echo "--doing---PK KE -c2 [KE Master-Teeth]" PK KE -c2 [KE Master-Teeth] echo "--doing---PK KE -r3" PK KE -r3 echo "--doing---PK KE -c3" PK KE -c3 echo "--doing---PK KE -c3 KE-filename" PK KE -c3 KE-filename echo "--doing---PK KE -r4" PK KE -r4 echo "--doing---PK KE -c4" PK KE -c4 echo "--doing---PK KE -c4 [Master-Teeth; last/alt. Master-Teeth; KE-Filename]" PK KE -c4 [Master-Teeth; last/alt. Master-Teeth; KE-Filename] SF -? SF default.pk@3 SF -W item,... SF -W AI:AI-name.number/item,... SF -Wr SF -Wr item,... SF -Wc SF -Wc item,... SF -wc AI:test.1/item SF AI test.1 SF AI SF SF -r SF -r#12 SF -w item SF -wr SF -wr item SF -wc SF -wc item