mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-04-20 19:17:24 +02:00
Add Jansson vendor library.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[1, 2]
|
||||
@@ -0,0 +1 @@
|
||||
[1, 2]
|
||||
@@ -0,0 +1,2 @@
|
||||
JSON_COMPACT=1
|
||||
export JSON_COMPACT
|
||||
@@ -0,0 +1 @@
|
||||
[1, 2]
|
||||
@@ -0,0 +1 @@
|
||||
[1,2]
|
||||
@@ -0,0 +1,3 @@
|
||||
JSON_COMPACT=1
|
||||
HASHSEED=1
|
||||
export JSON_COMPACT HASHSEED
|
||||
@@ -0,0 +1 @@
|
||||
{"a": 1, "b": 2}
|
||||
@@ -0,0 +1 @@
|
||||
{"a":1,"b":2}
|
||||
@@ -0,0 +1,2 @@
|
||||
JSON_ENSURE_ASCII=1
|
||||
export JSON_ENSURE_ASCII
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
"foo",
|
||||
"å ä ö",
|
||||
"foo åä",
|
||||
"åä foo",
|
||||
"å foo ä",
|
||||
"clef g: 𝄞"
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
["foo", "\u00E5 \u00E4 \u00F6", "foo \u00E5\u00E4", "\u00E5\u00E4 foo", "\u00E5 foo \u00E4", "clef g: \uD834\uDD1E"]
|
||||
@@ -0,0 +1,2 @@
|
||||
JSON_INDENT=4
|
||||
export JSON_INDENT
|
||||
@@ -0,0 +1 @@
|
||||
[1, 2]
|
||||
@@ -0,0 +1,4 @@
|
||||
[
|
||||
1,
|
||||
2
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
JSON_INDENT=4
|
||||
JSON_COMPACT=1
|
||||
export JSON_INDENT JSON_COMPACT
|
||||
@@ -0,0 +1 @@
|
||||
[1, 2]
|
||||
@@ -0,0 +1,4 @@
|
||||
[
|
||||
1,
|
||||
2
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
JSON_INDENT=4
|
||||
JSON_COMPACT=1
|
||||
HASHSEED=1
|
||||
export JSON_INDENT JSON_COMPACT HASHSEED
|
||||
@@ -0,0 +1 @@
|
||||
{"a": 1, "b": 2}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"a":1,
|
||||
"b":2
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
JSON_INDENT=4
|
||||
HASHSEED=1
|
||||
export JSON_INDENT HASHSEED
|
||||
@@ -0,0 +1 @@
|
||||
{"a": 1, "b": 2}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"a": 1,
|
||||
"b": 2
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
HASHSEED=1
|
||||
export HASHSEED
|
||||
@@ -0,0 +1 @@
|
||||
{"a": 1, "b": 2}
|
||||
@@ -0,0 +1 @@
|
||||
{"a": 1, "b": 2}
|
||||
@@ -0,0 +1,2 @@
|
||||
JSON_PRESERVE_ORDER=1
|
||||
export JSON_PRESERVE_ORDER
|
||||
@@ -0,0 +1 @@
|
||||
{"foo": 1, "bar": 2, "asdf": 3, "deadbeef": 4, "badc0ffee": 5, "qwerty": 6}
|
||||
@@ -0,0 +1 @@
|
||||
{"foo": 1, "bar": 2, "asdf": 3, "deadbeef": 4, "badc0ffee": 5, "qwerty": 6}
|
||||
@@ -0,0 +1,2 @@
|
||||
JSON_REAL_PRECISION=4
|
||||
export JSON_REAL_PRECISION
|
||||
@@ -0,0 +1 @@
|
||||
[1.23456789, 1.0, 1.0000000000000002]
|
||||
@@ -0,0 +1 @@
|
||||
[1.235, 1.0, 1.0]
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2009-2016 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.
|
||||
|
||||
is_test() {
|
||||
test -d $test_path
|
||||
}
|
||||
|
||||
run_test() {
|
||||
(
|
||||
if [ -f $test_path/env ]; then
|
||||
. $test_path/env
|
||||
fi
|
||||
$json_process --env <$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
|
||||
@@ -0,0 +1,2 @@
|
||||
JSON_SORT_KEYS=1
|
||||
export JSON_SORT_KEYS
|
||||
@@ -0,0 +1 @@
|
||||
{"foo": 1, "bar": 2, "baz": 3, "quux": 4}
|
||||
@@ -0,0 +1 @@
|
||||
{"bar": 2, "baz": 3, "foo": 1, "quux": 4}
|
||||
Reference in New Issue
Block a user