home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / xdme1820.lha / XDME / AREXX / testRVI.rexx < prev    next >
OS/2 REXX Batch file  |  1993-01-27  |  995b  |  39 lines

  1. /* Tests the direct variable interface    */
  2. /* Assumes WShell is available; if not,   */
  3. /* issue "run vartestC" separately        */
  4.  
  5. a.1 = "Just a test"
  6.  
  7. if left(address(),4) ~== "WSH_"  /* WShell host?   */
  8.    then signal SendComm          /* guess not ...  */
  9.  
  10. if ~show('Ports','VarTest') then /* vartest started?  */
  11.    do
  12.    'runwsh vartestC'             /* launch host       */
  13.    'waitforport VarTest'         /* wait for host     */
  14.    if rc ~= 0 then do
  15.       say "Couldn't start VarTest host"
  16.       exit 20
  17.       end
  18.    end
  19.  
  20. SendComm:   /* send a command to the VarTest host */
  21. say 'Before command status='status 'a.1='a.1 'a.2='a.2
  22. address 'VarTest' 'The first command'
  23. say 'After  command status='status 'a.1='a.1 'a.2='a.2
  24. say
  25.  
  26. say "Before test storage=" storage()
  27. call TestMem
  28.  
  29. /* send the 'CLOSE' command' */
  30. address 'VarTest' close
  31. exit
  32.  
  33. TestMem: procedure
  34. /* Test for memory usage */
  35. do for 10
  36.    address 'VarTest' 'Test command'
  37.    say "After test storage=" storage()
  38.    end
  39.