daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Feb 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ###############################################
  2. ## Filename:   Makefile
  3. ## Author:     Daniel Guenther
  4. ## Date:       2018-01-31
  5. ## Purpose:    To quickly create and run test cases for a small program
  6. ###############################################
  7.  
  8. program=gcl -f lab3.cl
  9. testdir=Tests
  10.  
  11. # runs the newest test
  12. runNewTest: ${testdir} ${progname}
  13.     ${program} < ${testdir}/`ls -t ${testdir} | head -1`
  14.  
  15. # runs program with each test case found in testing directory
  16. runTests: ${testdir} ${progname}
  17.     echo; for testfile in `ls ${testdir}/`; do ${program} < ${testdir}/$$testfile; echo; done
  18.  
  19. # quickly create a new one-line test case (prompts user for test contents, generates new filename)
  20. newTest: ${testdir}
  21.     i=0;while [ -f ${testdir}/test$$i ]; do i=$$(($$i+1)); done; read input && echo $$input > ${testdir}/test$$i
  22.  
  23. ${testdir}:
  24.     mkdir -p ${testdir}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top