home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 291.lha / DTM_Host / htest.rexx < prev    next >
OS/2 REXX Batch file  |  1992-09-02  |  3KB  |  156 lines

  1. /* htest.rexx */
  2.  
  3.  
  4. /*        Copyright © 1989 by Donald T. Meyer, Stormgate Software
  5.  *        All Rights Reserved
  6.  *
  7.  *        Donald T. Meyer
  8.  *        Stormgate Software
  9.  *        P.O. Box 383
  10.  *        St. Peters, MO  63376
  11.  *
  12.  *        BIX:    donmeyer        (almost daily)
  13.  *        GEnie:    D.MEYER            (weekly)
  14.  *        PLINK:    Stormgate        (weekly)
  15.  */
  16.  
  17.  
  18. if show( 'L', "REPORT_HOST" ) then
  19.     call report_host_test()
  20. else
  21.     say "Unable to test the report host, it's not running!" '1010'x
  22.  
  23.  
  24.  
  25. if show( 'L', "DTM_HOST" ) then
  26.     call dtm_host_test()
  27. else
  28.     say "Unable to test the DTM host, it's not running!"
  29.  
  30.  
  31.  
  32. say
  33. say "All done testing the hosts!"
  34.  
  35. exit 0
  36.  
  37.  
  38.  
  39. /*-----------------------------------------------------------------*/
  40.  
  41. report_host_test:        PROCEDURE
  42.  
  43.  
  44. say "------  Testing the report host  ------"
  45.  
  46.  
  47. call setreport( 1, "GLOBAL" )
  48.  
  49.  
  50. do i=1 to 15
  51.     call report( 1, "Stormgate " || i )
  52. end
  53.  
  54.  
  55. call setreport( 1, "GLOBAL", "Test Program" )
  56.  
  57.  
  58. do i=1 to 15
  59.     call report( 1, "Mice are nice. " || i )
  60. end
  61.  
  62.  
  63. /* call setreport( 1, , "From CLI" ) */
  64.  
  65.  
  66. do i=1 to 15
  67.     call report( 1, "Amiga " || i )
  68. end
  69.  
  70.  
  71. call endreport()
  72.  
  73. return
  74.  
  75.  
  76.  
  77. /*-----------------------------------------------------------------*/
  78.  
  79. dtm_host_test:        PROCEDURE
  80.  
  81.  
  82. say "------  Testing the dtm host  ------"
  83. say
  84.  
  85. call debug( "Doing the dtm_host test now.  This message displayed, 
  86.  via the debug() function!" )
  87.  
  88. say
  89. say
  90.  
  91.  
  92. /*        SHORTEN()        */
  93.  
  94. s = "Run with the big dogs, or stay on the porch."
  95.  
  96. say "Original string:               " || s
  97.  
  98. say "After calling shorten( s, 5 ): " || shorten( s, 5 )
  99. say
  100. say
  101.  
  102.  
  103.  
  104. /*        ENDSTRIP()        */
  105.  
  106. s = "Amiga.cbm"
  107.  
  108. say "Original string:                     " || s
  109.  
  110. say "After calling endstrip( s, '.cbm' ): " || endstrip( s, ".cbm" )
  111.  
  112. say "After calling endstrip( s, '.ibm' ): " || endstrip( s, ".ibm" )
  113. say
  114. say
  115.  
  116.  
  117.  
  118. /*        STRIP_TO_FILENAME()        */
  119.  
  120. s = "DF0:Amiga.cbm"
  121.  
  122. say "Original string:                      " || s
  123.  
  124. say "After calling strip_to_filename( s ): " || strip_to_filename( s )
  125. say
  126.  
  127. s = "DF0:Computers/Amiga.cbm"
  128.  
  129. say "Original string:                      " || s
  130.  
  131. say "After calling strip_to_filename( s ): " || strip_to_filename( s )
  132. say
  133. say
  134.  
  135.  
  136.  
  137. /*        TABEXPAND()        */
  138.  
  139. s = "one" || '09'x || "two" || '09'x || "three!"
  140. s1 = "one<tab>two<tab>three!"
  141.  
  142.  
  143. say "Original string:                  " || s1
  144. say "After calling tabexpand( s ):     " || tabexpand( s )
  145. say "After calling tabexpand( s, 4 ):  " || tabexpand( s, 4 )
  146. say "After calling tabexpand( s, 12 ): " || tabexpand( s, 12 )
  147. say
  148. say
  149.  
  150.  
  151. return
  152.  
  153.  
  154.  
  155. /*-----------------------------------------------------------------*/
  156.