diff options
author | Petri Lehtinen <petri@digip.org> | 2024-03-25 19:01:14 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2024-03-25 19:16:34 +0200 |
commit | dcbeb588297fe79e5d39c56f9d27b3860ee777f4 (patch) | |
tree | 5c5ca83c05d137fa3085d257e707929d9b539d6f | |
parent | 53383b9e269437594249cd59cead6b3ec74f5771 (diff) | |
download | jansson-dcbeb588297fe79e5d39c56f9d27b3860ee777f4.zip jansson-dcbeb588297fe79e5d39c56f9d27b3860ee777f4.tar.gz jansson-dcbeb588297fe79e5d39c56f9d27b3860ee777f4.tar.bz2 |
Simplify tests even more
Drop the useless `export` lines from `env` files.
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | test/bin/json_process.c | 5 | ||||
-rw-r--r-- | test/suites/encoding-flags/compact-array/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/compact-object/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/ensure-ascii/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/indent-array/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/indent-compact-array/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/indent-compact-object/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/indent-object/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/object/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/preserve-order/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/real-precision/env | 1 | ||||
-rw-r--r-- | test/suites/encoding-flags/sort-keys/env | 1 | ||||
-rwxr-xr-x | test/suites/valid/run | 3 |
14 files changed, 2 insertions, 18 deletions
@@ -12,6 +12,7 @@ Work in progress * Build: - Make test output nicer in CMake based builds (#683) + - Simplify tests (#685) Version 2.14 ============ diff --git a/test/bin/json_process.c b/test/bin/json_process.c index 3fa926b..965fa6b 100644 --- a/test/bin/json_process.c +++ b/test/bin/json_process.c @@ -80,11 +80,10 @@ static char *loadfile(FILE *file) { static void read_conf(FILE *conffile) { char *buffer, *line, *val; + conf.have_hashseed = 0; buffer = loadfile(conffile); for (line = strtok(buffer, "\r\n"); line; line = strtok(NULL, "\r\n")) { - if (!strncmp(line, "export ", 7)) - continue; val = strchr(line, '='); if (!val) { printf("invalid configuration line\n"); @@ -109,8 +108,6 @@ static void read_conf(FILE *conffile) { if (!strcmp(line, "HASHSEED")) { conf.have_hashseed = 1; conf.hashseed = atoi(val); - } else { - conf.have_hashseed = 0; } } diff --git a/test/suites/encoding-flags/compact-array/env b/test/suites/encoding-flags/compact-array/env index 4474aaf..beddaa8 100644 --- a/test/suites/encoding-flags/compact-array/env +++ b/test/suites/encoding-flags/compact-array/env @@ -1,2 +1 @@ JSON_COMPACT=1 -export JSON_COMPACT diff --git a/test/suites/encoding-flags/compact-object/env b/test/suites/encoding-flags/compact-object/env index 93cb33d..57cf7b4 100644 --- a/test/suites/encoding-flags/compact-object/env +++ b/test/suites/encoding-flags/compact-object/env @@ -1,3 +1,2 @@ JSON_COMPACT=1 HASHSEED=1 -export JSON_COMPACT HASHSEED diff --git a/test/suites/encoding-flags/ensure-ascii/env b/test/suites/encoding-flags/ensure-ascii/env index 1b7b3e3..7867c32 100644 --- a/test/suites/encoding-flags/ensure-ascii/env +++ b/test/suites/encoding-flags/ensure-ascii/env @@ -1,2 +1 @@ JSON_ENSURE_ASCII=1 -export JSON_ENSURE_ASCII diff --git a/test/suites/encoding-flags/indent-array/env b/test/suites/encoding-flags/indent-array/env index d220f83..11f6684 100644 --- a/test/suites/encoding-flags/indent-array/env +++ b/test/suites/encoding-flags/indent-array/env @@ -1,2 +1 @@ JSON_INDENT=4 -export JSON_INDENT diff --git a/test/suites/encoding-flags/indent-compact-array/env b/test/suites/encoding-flags/indent-compact-array/env index 78fbfcc..f6a3b3e 100644 --- a/test/suites/encoding-flags/indent-compact-array/env +++ b/test/suites/encoding-flags/indent-compact-array/env @@ -1,3 +1,2 @@ JSON_INDENT=4 JSON_COMPACT=1 -export JSON_INDENT JSON_COMPACT diff --git a/test/suites/encoding-flags/indent-compact-object/env b/test/suites/encoding-flags/indent-compact-object/env index c73acc1..d3a706e 100644 --- a/test/suites/encoding-flags/indent-compact-object/env +++ b/test/suites/encoding-flags/indent-compact-object/env @@ -1,4 +1,3 @@ JSON_INDENT=4 JSON_COMPACT=1 HASHSEED=1 -export JSON_INDENT JSON_COMPACT HASHSEED diff --git a/test/suites/encoding-flags/indent-object/env b/test/suites/encoding-flags/indent-object/env index 961558c..f08e847 100644 --- a/test/suites/encoding-flags/indent-object/env +++ b/test/suites/encoding-flags/indent-object/env @@ -1,3 +1,2 @@ JSON_INDENT=4 HASHSEED=1 -export JSON_INDENT HASHSEED diff --git a/test/suites/encoding-flags/object/env b/test/suites/encoding-flags/object/env index 9120b03..9e1ca2a 100644 --- a/test/suites/encoding-flags/object/env +++ b/test/suites/encoding-flags/object/env @@ -1,2 +1 @@ HASHSEED=1 -export HASHSEED diff --git a/test/suites/encoding-flags/preserve-order/env b/test/suites/encoding-flags/preserve-order/env index 4d9d206..504bf51 100644 --- a/test/suites/encoding-flags/preserve-order/env +++ b/test/suites/encoding-flags/preserve-order/env @@ -1,2 +1 @@ JSON_PRESERVE_ORDER=1 -export JSON_PRESERVE_ORDER diff --git a/test/suites/encoding-flags/real-precision/env b/test/suites/encoding-flags/real-precision/env index 9c52cbc..8ec3a7c 100644 --- a/test/suites/encoding-flags/real-precision/env +++ b/test/suites/encoding-flags/real-precision/env @@ -1,2 +1 @@ JSON_REAL_PRECISION=4 -export JSON_REAL_PRECISION diff --git a/test/suites/encoding-flags/sort-keys/env b/test/suites/encoding-flags/sort-keys/env index 3ef24cb..1e27ccf 100644 --- a/test/suites/encoding-flags/sort-keys/env +++ b/test/suites/encoding-flags/sort-keys/env @@ -1,2 +1 @@ JSON_SORT_KEYS=1 -export JSON_SORT_KEYS diff --git a/test/suites/valid/run b/test/suites/valid/run index afc488c..665aad0 100755 --- a/test/suites/valid/run +++ b/test/suites/valid/run @@ -5,9 +5,6 @@ # Jansson is free software; you can redistribute it and/or modify # it under the terms of the MIT license. See LICENSE for details. -JSON_SORT_KEYS=1 -export JSON_SORT_KEYS - is_test() { test -d $test_path } |