X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=tests%2Fcli%2Fquery%2Ftest_query;h=21a3546758b4521722e843ff8ea015d77cc383be;hb=6375b9429f8332f3eacc2ec795aa1924c73d9cc8;hp=1be9fa24287218249173c7772c1f6ea6928a8a33;hpb=0076e742317731ce785ae82f65fc9a2d429cb9c1;p=babeltrace.git diff --git a/tests/cli/query/test_query b/tests/cli/query/test_query index 1be9fa24..21a35467 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 @@ -89,9 +79,12 @@ expect_failure "ValueError: catastrophic failure" \ 'src.query.SourceWithQueryThatPrintsParams' 'please-fail' '-p' 'a=2' # Non-existent component class. -expect_failure 'Cannot find component class: plugin-name="query", comp-cls-name="NonExistentSource", comp-cls-type=1' \ +expect_failure 'Cannot find component class: plugin-name="query", comp-cls-name="NonExistentSource", comp-cls-type=SOURCE' \ '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"