added -v to hcl. found a bug of a new line printed when printf is called. need to debug it

This commit is contained in:
2019-04-16 09:35:56 +00:00
parent 7f7a2685d0
commit dc3c393247
2 changed files with 19 additions and 3 deletions

11
t/test-bi.sh Normal file
View File

@ -0,0 +1,11 @@
a=`openssl rand -hex 20 | tr '[a-z]' '[A-Z]'`
b=`openssl rand -hex 19 | tr '[a-z]' '[A-Z]'`
q1=$(echo -e "ibase=16\nprint ($a / $b)" | bc -q)
r1=$(echo -e "ibase=16\nprint ($a % $b)" | bc -q)
q2=$(echo -e "(printf \"%O\" (/ #x$a #x$b))" | ~/xxx/bin/hcl /dev/stdin 2> /dev/null)
r2=$(echo -e "(printf \"%O\" (rem #x$a #x$b))" | ~/xxx/bin/hcl /dev/stdin 2>/dev/null)
echo "$q2"
echo "$r2"