#!/bin/bash
#
-# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License, version 2 only, as
-# published by the Free Software Foundation.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
+# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Test how parameters are applied to sources auto-discovered by the convert
# command.
-if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
+if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
else
UTILSSH="$(dirname "$0")/../../utils/utils.sh"
# shellcheck source=../../utils/utils.sh
SH_TAP=1 source "$UTILSSH"
-NUM_TESTS=8
+NUM_TESTS=9
plan_tests $NUM_TESTS
'{a=10500000.0, b=10500000.0, c=1.05e-05, d=1.05e-05}'
expect_success 'array' 'a=[1, [["hi",]]]' \
'{a=[1, [[hi]]]}'
+expect_success 'map' 'a=4,a={},b={salut="la gang",comment="ca va",oh={x=2}}' \
+ '{a={}, b={comment=ca va, oh={x=2}, salut=la gang}}'
rm -f "$expected_file"