summaryrefslogtreecommitdiff
path: root/runv
diff options
context:
space:
mode:
Diffstat (limited to 'runv')
-rwxr-xr-xrunv7
1 files changed, 6 insertions, 1 deletions
diff --git a/runv b/runv
index ccd621f..614eda3 100755
--- a/runv
+++ b/runv
@@ -1,5 +1,10 @@
#!/bin/sh
-valgrind -q --track-origins=yes --error-exitcode=1 --malloc-fill=0xcd --free-fill=0xef --num-callers=100 ./toc test.toc || exit 1
+if [ "$2" = "" ]; then
+ tocf=test.toc
+else
+ tocf="$2"
+fi
+valgrind -q --track-origins=yes --error-exitcode=1 --malloc-fill=0xcd --free-fill=0xef --num-callers=100 ./toc $tocf || exit 1
if [ "$1" = "c" ]; then
gcc out.c && ./a.out
elif [ "$1" = "pc" ]; then