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:
11
t/test-bi.sh
Normal file
11
t/test-bi.sh
Normal 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"
|
Reference in New Issue
Block a user