libcruft-util/test/cpp.sh.in

24 lines
378 B
Bash
Raw Normal View History

2018-04-01 14:49:10 +10:00
#!/usr/bin/env bash
CPP="@CMAKE_CURRENT_BINARY_DIR@/macro"
count=0
ret=0
for src in "@CMAKE_CURRENT_SOURCE_DIR@/test/cpp/good"/*.inc; do
res="${src%.inc}.res"
if cmp --quiet <($CPP ${src}) <(cat ${res}); then
head="ok"
else
head="not ok"
ret=1
fi
echo "${head} - ${src}"
count=$((count+1))
done
echo "1..${count}"
exit $ret