aboutsummaryrefslogtreecommitdiff
path: root/mkunit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mkunit.sh')
-rwxr-xr-xmkunit.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkunit.sh b/mkunit.sh
index 867d6df..b99b6d3 100755
--- a/mkunit.sh
+++ b/mkunit.sh
@@ -1,7 +1,11 @@
1#!/bin/bash 1#!/bin/bash
2 2
3inputfile="$1"
4
3function mkfunc() 5function mkfunc()
4{ 6{
7 line=$(grep -nh "{%$1" "$inputfile")
8 echo "#line ${line%%:*} \"$inputfile\" \\"
5 echo "void $1() /**< expect ${2:-pass} */" 9 echo "void $1() /**< expect ${2:-pass} */"
6} 10}
7 11