home *** CD-ROM | disk | FTP | other *** search
/ Carousel / CAROUSEL.cdr / mactosh / lang / mpw_scri.hqx / ExCon.pit / ec_test < prev    next >
Encoding:
Text File  |  1987-02-17  |  640 b   |  35 lines

  1. # ec_test - Test Expand and Contract.
  2. #
  3. # Steve Knouse
  4. # Apple Computer
  5. # 2950 N Loop W, Suite 1070
  6. # Houston, TX  77092
  7. # Applelink: KNOUSE
  8.  
  9. # remove all alias's
  10. unalias
  11.  
  12. # check the syntax
  13. if {#} <> 1 
  14.     echo Error: useage {0} filename
  15.     exit
  16. end
  17.  
  18. # get out if we can't create find or duplicate the object file
  19. set exit 1
  20. set temp_file "aaaaa_`date -s -d`"
  21. duplicate -y "{1}" "{temp_file}"
  22.  
  23. # expand and contract the temp file
  24. expand "{temp_file}"
  25. contract "{temp_file}"
  26.  
  27. # compare the original with the expanded/contracted temp file
  28. set exit 0
  29. compare "{1}" "{temp_file}"
  30.  
  31. # clean up
  32. close -n "{temp_file}"
  33. delete "{temp_file}"
  34. set exit 1
  35.