Annotation of parser3/tests/174.html, revision 1.1
1.1 ! misha 1: @main[][sDir;sName;tList;hf;i]
! 2: $sDir[174]
! 3: $sName[data]
! 4:
! 5: # remove previous files first
! 6: $tList[^file:list[$sDir]]
! 7: ^tList.menu{
! 8: ^file:delete[$sDir/$tList.name]
! 9: }
! 10:
! 11: # open hashfile
! 12: $hf[^hashfile::open[$sDir/$sName]]
! 13:
! 14: # check hashfile files -- it mustn't exist because of delayed opened
! 15: ^checkFiles[$sDir;$sName]
! 16: <hr />
! 17:
! 18: # add item with key '0' for 2 sec
! 19: $hf.0[
! 20: $.value[zigi]
! 21: $.expires(2/24/60/60)
! 22: ]
! 23:
! 24: # add more items to hashfile
! 25: ^for[i](1;9){
! 26: $hf.[$i][=$i=]
! 27: }
! 28:
! 29: ^checkFiles[$sDir;$sName]
! 30:
! 31: ^$hf.0: '$hf.0'<br />
! 32:
! 33: <hr />
! 34: # wait 2 secs till item with key '0' expired
! 35: ^sleep(3)
! 36:
! 37: ^$hf.0: '$hf.0'<br />
! 38:
! 39: # release before .foreach
! 40: ^hf.release[]
! 41:
! 42: <hr />
! 43: keys: ^hf.foreach[k;]{$k}[, ]
! 44:
! 45:
! 46: # release before .delete
! 47: ^hf.release[]
! 48:
! 49: ^hf.delete[1]
! 50:
! 51: <hr />
! 52: ^hf.foreach[k;v]{^$hf.${k}: '$v'<br />}
! 53:
! 54:
! 55: ^hf.delete[2]
! 56:
! 57: <hr />
! 58: $s[^hf.foreach[k;v]{^$hf.${k}: '$v'}[<br />]]
! 59: $s<br />
! 60:
! 61: # checking for cleanup (just calls: we can't check internals)
! 62: ^hf.cleanup[]
! 63:
! 64:
! 65: <hr />
! 66: # delete hashfile
! 67: ^hf.delete[]
! 68:
! 69: # files mustn't exist after .delete[]
! 70: ^checkFiles[$sDir;$sName]
! 71:
! 72: # try to read not existing hashfile (it must auto opened)
! 73: <hr />
! 74: ^hf.foreach[k;v]{^$hf.${k}: '$v'<br />}
! 75:
! 76: # files must exist now
! 77: ^checkFiles[$sDir;$sName]
! 78:
! 79:
! 80:
! 81:
! 82:
! 83:
! 84: @checkFiles[sDir;sName]
! 85: ^checkFile[$sDir/${sName}.dir]
! 86: ^checkFile[$sDir/${sName}.pag]
! 87:
! 88:
! 89:
! 90:
! 91: @checkFile[sFileName]
! 92: $sFileName -- ^if(-f $sFileName){exist}{not exist}<br />
E-mail: