3889af476b
* Now that JSON_SORT_KEYS is implemented, take it into use with the valid and valid-strip suites. This is to ensure that the tests remain valid even if the string hash function is changed in the future. * Remove test_dump API test. Instead, implement the same tests more elegantly in the encoding-flags suite.
30 lines
651 B
Bash
Executable File
30 lines
651 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2009 Petri Lehtinen <petri@digip.org>
|
|
#
|
|
# Jansson is free software; you can redistribute it and/or modify
|
|
# it under the terms of the MIT license. See LICENSE for details.
|
|
|
|
export JSON_SORT_KEYS=1
|
|
|
|
is_test() {
|
|
test -d $test_path
|
|
}
|
|
|
|
run_test() {
|
|
$json_process <$test_path/input >$test_log/stdout 2>$test_log/stderr
|
|
valgrind_check $test_log/stderr || return 1
|
|
cmp -s $test_path/output $test_log/stdout
|
|
}
|
|
|
|
show_error() {
|
|
valgrind_show_error && return
|
|
|
|
echo "EXPECTED OUTPUT:"
|
|
nl -bn $test_path/output
|
|
echo "ACTUAL OUTPUT:"
|
|
nl -bn $test_log/stdout
|
|
}
|
|
|
|
. $top_srcdir/test/scripts/run-tests.sh
|