From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 AEFF73858CDB for ; Fri, 6 Jan 2023 10:25:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEFF73858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673000756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4DL+olIY6p0UVo94aWSNixflUmiSX8kd4yYFU9KQ17M=; b=GSc73UnBqFwXP5CWGueXmbJPpydbyIFBUfozZoQ7zfZOOdGmSRO4VbsXV9KjVTRfKq8Bgi ii+c+oEzXsFa1Cbz1Wbe8+kLGlM+bnxDdWWEYCmOvClfgBB2QTaOwYUZiaNTlPWWnyLcpJ Jc9HonPCHTkrKu3XPb2qC4eQxmIZeyo= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-106-5lN1heoNOVe39JidT3sNxg-1; Fri, 06 Jan 2023 05:25:55 -0500 X-MC-Unique: 5lN1heoNOVe39JidT3sNxg-1 Received: by mail-ej1-f69.google.com with SMTP id qk40-20020a1709077fa800b007eeb94ecdb5so871750ejc.12 for ; Fri, 06 Jan 2023 02:25:54 -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=4DL+olIY6p0UVo94aWSNixflUmiSX8kd4yYFU9KQ17M=; b=q4wO2sWVW5vEvGcXvvfw9LFa1W44yjCSnPf43DQuSBnx0KQQZU9aJr/FjK6LjrPUQF vnz5ZJa69zQoIf+4lETrHgveMsCR/woWI7Fuqik/jtbx8uLIHiYTEiZy307Hgl0ie3GU 8Xroypjooam39BMyGx6OfOwtfZUuR6XhcvJ0Ym9GgNb1r70b9OTdORjfw4oNOisTggz/ OvVg8DL1ByFpgtnf/pGKRFJrhmWJ//XUF8GbbDvITj6dPf5lTgdb9cQkEDU94ZmVvJnC 1ukOOps7yi6Q1fd1B68J11DIqBoq1UsnlhtpME+uRTNgfIMOUA+157uxcOGCj4tPrR0g /0uQ== X-Gm-Message-State: AFqh2koRR7jh2ZN/5+E+bGKeRVa6k5f540Ujw6skwSS3gx85mJa2K+pq bvQr2W4aNgNoNl2OUA5feIET64jWZ/RpgBLlVbgAuF4Mw/SDf42HXPsF4kA7/ym6tvuGBUYMnQ4 Ay+2Ruu3au73aIKoG/qGbww4YxeVfk/i9jskrgsyuoyE/ABP6YxT79TpMdNvjbR1hlICCg/VKwQ == X-Received: by 2002:a17:907:9d19:b0:7b9:f9d8:9554 with SMTP id kt25-20020a1709079d1900b007b9f9d89554mr43835926ejc.40.1673000753848; Fri, 06 Jan 2023 02:25:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXsWD+OqiEbhK2d2b4s69lP/xEZ61z1NeDXT1sSv4qJnWeTmOeS0ZE7BuIFEw7Pogvr5ugwR/w== X-Received: by 2002:a17:907:9d19:b0:7b9:f9d8:9554 with SMTP id kt25-20020a1709079d1900b007b9f9d89554mr43835915ejc.40.1673000753518; Fri, 06 Jan 2023 02:25:53 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id kv18-20020a17090778d200b0084c643582e0sm276442ejc.14.2023.01.06.02.25.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 02:25:53 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 03/15] gdb/testsuite: update gdb.tui/tui-nl-filtered-output.exp Date: Fri, 6 Jan 2023 10:25:30 +0000 Message-Id: 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,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 List-Id: Following on from the previous commit, in this commit I am updating the test script gdb.tui/tui-nl-filtered-output.exp to take account of the changes in commit: commit 9162a27c5f5828240b53379d735679e2a69a9f41 Date: Tue Nov 13 11:59:03 2018 -0700 Change gdb test suite's TERM setting In the above commit the TERM environment variable was changed to be 'dumb' by default, which means that tests, that previously activated tui mode, no longer do unless TERM is set to 'ansi'. As the gdb.tui/tui-nl-filtered-output.exp script didn't do this, the test stopped working. As the expect patterns in this script were pretty generic no tests actually started failing, and we never noticed. In this commit I update the test script to correctly activate our terminal emulator, the test continues to pass after this update, but now we are testing in tui mode. --- .../gdb.tui/tui-nl-filtered-output.exp | 41 ++++++++----------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp index 5a2a4205bb5..b3d80a36a6f 100644 --- a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp +++ b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp @@ -30,28 +30,19 @@ # # (gdb) -gdb_exit -gdb_start - -if {[skip_tui_tests]} { - return -} - -# Enable the TUI. - -set test "tui enable" -gdb_test_multiple "tui enable" $test { - -re "$gdb_prompt $" { - pass $test - } -} - -# Make sure filtering/pagination is enabled, but make the window high -# enough that we don't paginate in practice. -gdb_test_no_output "set pagination on" -gdb_test_no_output "set height 2000" - -gdb_test \ - {printf "hello\nworld\n"} \ - "hello\r\nworld" \ - "correct line breaks" +tuiterm_env + +# Setup and enter TUI mode. +Term::clean_restart 24 80 +Term::enter_tui + +# Send the command, and check the output is correctly split over +# multiple lines. +Term::command \ + {printf "hello\nworld\n"} +Term::check_region_contents "check printf output" \ + 0 16 80 4 [multi_line \ + "$gdb_prompt printf \"hello\\\\nworld\\\\n\"\\s+" \ + "hello\\s+" \ + "world\\s+" \ + "$gdb_prompt\\s+"] -- 2.25.4