test 433 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. set -e
  3. if [ -t 1 ]; then
  4. red="$(printf "\033[31m")"
  5. brightred="$(printf "\033[31;1m")"
  6. green="$(printf "\033[32m")"
  7. reset="$(printf "\033[m")"
  8. else
  9. red=
  10. brightred=
  11. green=
  12. reset=
  13. fi
  14. phantomjs tests/runner.coffee tests/qunit.html | sed -E "
  15. # failure line:
  16. s/^(✘.+)/${red}\\1${reset}/
  17. # failure details:
  18. s/^( .+)/${brightred}\\1${reset}/
  19. # success marker:
  20. s/(✔︎)/${green}\\1${reset}/
  21. "