24 lines
378 B
Bash
24 lines
378 B
Bash
|
#!/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
|