Files
Krystian Hebel b18a804194 scripts/list-tests-from-{json,robot}.sh: add new scripts
Can be used to check whether test cases in source files and their
copy in `test_cases.json` are in sync.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
2025-06-16 17:16:16 +02:00

20 lines
456 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2024 3mdeb <contact@3mdeb.com>
#
# SPDX-License-Identifier: Apache-2.0
# -r - produce raw output, don't escape special characters and don't quote
# For each doc, produce line containing:
# - "_id DEPRECATED" if doc has `changed_to` field
# - "_id name" otherwise
jq -r '
.[].doc |
._id + " " +
if has("changed_to") then
"DEPRECATED"
else
.name
end
' test_cases.json