#!/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.
if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
# shellcheck source=../../utils/utils.sh
SH_TAP=1 source "$UTILSSH"
-NUM_TESTS=11
+NUM_TESTS=15
plan_tests $NUM_TESTS
expect_failure 'Cannot find component class: plugin-name="query", comp-cls-name="NonExistentSource", comp-cls-type=1' \
'src.query.NonExistentSource' 'the-object' '-p' 'a=2'
+# Wrong parameter syntax.
+expect_failure "Invalid format for --params option's argument:" \
+ 'src.query.SourceWithQueryThatPrintsParams' 'please-fail' '-p' 'a=3,'
rm -f "$stdout_expected_file"
rm -f "$stdout_file"