jose-jws-fmt 552 B

1234567891011121314151617181920
  1. #!/bin/bash -ex
  2. for f in $VECTORS/*.jwsc; do
  3. cmpct=`cat $f`
  4. flat=`echo $f | sed 's|jwsc|jwsf|'`
  5. gen=`echo $f | sed 's|jwsc|jwsg|'`
  6. if [ -f $flat ]; then
  7. [ `jose jws fmt -i $flat -c` == $cmpct ]
  8. [ `jose jws fmt -i $flat | jose jws fmt -i- -c` == $cmpct ]
  9. fi
  10. if [ -f $gen ]; then
  11. [ `jose jws fmt -i $gen -c` == $cmpct ]
  12. [ `jose jws fmt -i $gen | jose jws fmt -i- -c` == $cmpct ]
  13. fi
  14. [ `jose jws fmt -i $f -c` == $cmpct ]
  15. [ `jose jws fmt -i $f | jose jws fmt -i- -c` == $cmpct ]
  16. done