run 633 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org>
  4. #
  5. # Jansson is free software; you can redistribute it and/or modify
  6. # it under the terms of the MIT license. See LICENSE for details.
  7. is_test() {
  8. test -d $test_path
  9. }
  10. run_test() {
  11. $json_process --env <$test_path/input >$test_log/stdout 2>$test_log/stderr
  12. valgrind_check $test_log/stderr || return 1
  13. cmp -s $test_path/error $test_log/stderr
  14. }
  15. show_error() {
  16. valgrind_show_error && return
  17. echo "EXPECTED ERROR:"
  18. nl -bn $test_path/error
  19. echo "ACTUAL ERROR:"
  20. nl -bn $test_log/stderr
  21. }
  22. . $top_srcdir/test/scripts/run-tests.sh