From patchwork Thu Jan 12 19:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 63115 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 10166384606C for ; Thu, 12 Jan 2023 19:08:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10166384606C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673550527; bh=y0HLrZ5iRou9fSZ5+Dn9R5f7JMZ6n4aNFweKEf1yqqs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=B9+vin5VddgErQ8aAsf3ZNEXTNJl/Uv6KDrvO2or8303EMRo/jwvEes7wxxE+nc3B 3wxtcgdQtq+k0POufnzIVxQU76XogtKht3O6KQEvWI5wwQH6ZuZnvc5OZLv6JsRqT5 KZPpNVUOSpRZ0GxEPbHYjJ89xHXHP3J/aJJVV7io= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0C9CF3858C74 for ; Thu, 12 Jan 2023 19:08:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C9CF3858C74 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-256-JDsSyjX9PNW9DxGxMv3eYA-1; Thu, 12 Jan 2023 14:08:22 -0500 X-MC-Unique: JDsSyjX9PNW9DxGxMv3eYA-1 Received: by mail-wm1-f71.google.com with SMTP id bd6-20020a05600c1f0600b003d96f7f2396so12922162wmb.3 for ; Thu, 12 Jan 2023 11:08:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y0HLrZ5iRou9fSZ5+Dn9R5f7JMZ6n4aNFweKEf1yqqs=; b=cXu4Yu4fojRCFLfP+a60rWuUB3R52IrzRtLpKQ+x8U2VswoG/aWbD0/6eReuIX/tSi V1IoKOdQ7BRAINioNFDNlOT6qOMUZ2568AvedOeFuV8+7ejJ2IHa7eka53g5EC6eOJQ8 6JDJt9oaDq31/cXx90llGMrMJ2kwaJl2ZfrJDcD2xBzBDiLKAuJJa+THYTJ4GseOyyuP 7i4d7zezRcf9Vu2t/ghjLM+sIVGA92VkULClnVIqt4YKTTR6kFx4Oa13SI1qMi8GPNT7 Z461lscGWvobIkREI2ZbY+8IszElc3Qa85j2BCLi/jPWPdnrwyb+lgOLPLrNh+tUV+RS W2+g== X-Gm-Message-State: AFqh2krJNL7tlUwqHXnLfAgPhfJyIDhPYpzZ2gih/cuGrNHYspxtUs73 vOZ+OGy0esiD2g2VXSE2C3sI6pZqXDRzk6iEb/r0/p6hJ8K+tw+DHLdGQZ0GBxEge8bCCvI2gnG HKLyQUH65vC0uyKEd8/zQJcZt9RFmUTKM3rBsKXLWRge5cPfyc4uvcN+f84MhSiHlF0dU0rwDYw == X-Received: by 2002:a05:600c:4aa8:b0:3d1:cee0:46d0 with SMTP id b40-20020a05600c4aa800b003d1cee046d0mr55672821wmp.25.1673550501390; Thu, 12 Jan 2023 11:08:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXt8mZN6TXElzkVwzA+J2vsGBVqbcrDKC+OGhft3TQ+IPiZUEyFcIGVeuYiR7mg3D40xMhDpxg== X-Received: by 2002:a05:600c:4aa8:b0:3d1:cee0:46d0 with SMTP id b40-20020a05600c4aa800b003d1cee046d0mr55672806wmp.25.1673550501125; Thu, 12 Jan 2023 11:08:21 -0800 (PST) Received: from localhost (92.40.218.34.threembb.co.uk. [92.40.218.34]) by smtp.gmail.com with ESMTPSA id j30-20020a05600c1c1e00b003d9f14e9085sm15696645wms.17.2023.01.12.11.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 11:08:20 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 1/2] gdb/testsuite: use test_gdb_complete_unique more in C++ tests Date: Thu, 12 Jan 2023 19:08:10 +0000 Message-Id: <8a024e8dabe4c53d0b3bd307d42e92572bf5f4c7.1673550414.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Spotted in gdb.cp/cpcompletion.exp that we could replace some uses of gdb_test with test_gdb_complete_unique, this will extend the completion testing to check tab-completion as well as completion using the 'complete' command in some additional cases. --- gdb/testsuite/gdb.cp/cpcompletion.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp index 931f376a23d..371e90cca7d 100644 --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -85,16 +85,16 @@ if {![runto "${srcfile}:$bp_location"]} { # This also tests inheritance -- completion should only see a single # "get_foo". -gdb_test "complete p foo1.g" "p foo1\\.get_foo" +test_gdb_complete_unique "p foo1.g" "p foo1.get_foo" # Test inheritance without overriding. -gdb_test "complete p foo1.base" "p foo1\\.base_function_only" +test_gdb_complete_unique "p foo1.base" "p foo1.base_function_only" # Test non-completion of constructor names. -gdb_test "complete p foo1.Fo" "p foo1\\.Foofoo" +test_gdb_complete_unique "p foo1.Fo" "p foo1.Foofoo" # Test completion with an anonymous struct. -gdb_test "complete p a.g" "p a\\.get" +test_gdb_complete_unique "p a.g" "p a.get" with_test_prefix "expression with namespace" { # Before the scope operator, GDB shows all the symbols whose