tangetools/bsearch/regressiontest
2016-07-11 19:38:12 +02:00

45 lines
970 B
Bash
Executable file

#!/bin/bash
test_tmp=`tempfile`
export test_tmp
test_n() {
tmp=${test_tmp}_n
true > $tmp
bsearch -n $tmp 0 2 2.1 100000
echo > $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
echo 1.000000000 > $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
echo 1.000000000 > $tmp
echo 2 >> $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
echo 1 > $tmp
echo 2.000000000 >> $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
echo 1.000000000 > $tmp
echo 2 >> $tmp
echo 3 >> $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
echo 1 > $tmp
echo 2.000000000 >> $tmp
echo 3 >> $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
echo 1 > $tmp
echo 2 >> $tmp
echo 3.000000000 >> $tmp
xargs < $tmp
bsearch -n $tmp 0 2 2.1 100000
rm $tmp
}
export -f $(compgen -A function | grep test_)
compgen -A function | grep test_ | sort | parallel -j6 --tag -k '{} 2>&1'