X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Fcli%2Fquery%2Ftest_query;h=3227650b122b037d9bbb10445e4ef18559e7218d;hp=1be9fa24287218249173c7772c1f6ea6928a8a33;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hpb=0076e742317731ce785ae82f65fc9a2d429cb9c1 diff --git a/tests/cli/query/test_query b/tests/cli/query/test_query index 1be9fa24..3227650b 100755 --- a/tests/cli/query/test_query +++ b/tests/cli/query/test_query @@ -1,19 +1,9 @@ #!/bin/bash # -# Copyright (C) 2019 Simon Marchi -# -# 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 # -# 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" @@ -24,7 +14,7 @@ fi # shellcheck source=../../utils/utils.sh SH_TAP=1 source "$UTILSSH" -NUM_TESTS=11 +NUM_TESTS=15 plan_tests $NUM_TESTS @@ -92,6 +82,9 @@ expect_failure "ValueError: catastrophic failure" \ 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"