asterisk/pbx/ael/ael-test/runtests
Luigi Rizzo 799126216e - fix miscalculation in column numbers when multiple tabs
or empty lines are involved;
- change linku1() to return the head of the list (unused at the moment);
- ignore the source line number in runtests as they change with the
  source and cause mismatches in the comparison with the reference output.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 14:17:03 +00:00

19 lines
479 B
Bash
Executable file

#!/bin/bash
ORIG=`mktemp /tmp/mytest.XXXXXX`
NEW=`mktemp /tmp/mytest.XXXXXX`
for i in ael-test*; do
echo -n Test: $i..................
(cd $i; ../../../../utils/aelparse -n -d | grep -v -i 'seconds' > ../res.$i)
sed 's/line:[0-9]*//; /^Executed.*/d' < res.$i > $NEW
sed 's/line:[0-9]*//; /^Executed.*/d' < ref.$i > $ORIG
if (diff -q $NEW $ORIG > /dev/null 2>&1 ) then
echo PASSED
rm res.$i
else
echo %%%%%%FAILED%%%%%%
diff -u ref.$i res.$i
fi
done
rm $NEW $ORIG