public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Style "pwd" output
Date: Wed, 02 Oct 2019 15:44:00 -0000	[thread overview]
Message-ID: <14309bb6bfe31e5ad26035cd41a46bdbaec154b0@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 14309bb6bfe31e5ad26035cd41a46bdbaec154b0 ***

commit 14309bb6bfe31e5ad26035cd41a46bdbaec154b0
Author:     Tom Tromey <tom@tromey.com>
AuthorDate: Tue Jun 4 20:00:40 2019 -0600
Commit:     Tom Tromey <tom@tromey.com>
CommitDate: Tue Oct 1 15:12:39 2019 -0600

    Style "pwd" output
    
    This changes the "pwd" command to style its output.
    
    gdb/ChangeLog
    2019-10-01  Tom Tromey  <tom@tromey.com>
    
            * cli/cli-cmds.c (pwd_command): Style output.
    
    gdb/testsuite/ChangeLog
    2019-10-01  Tom Tromey  <tom@tromey.com>
    
            * gdb.base/style.exp: Test "pwd".

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 980aa60571..514a8bd99a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-01  Tom Tromey  <tom@tromey.com>
+
+	* cli/cli-cmds.c (pwd_command): Style output.
+
 2019-10-01  Pedro Alves  <palves@redhat.com>
 	    Tom Tromey  <tom@tromey.com>
 
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 59c71f6756..9f7b052d8e 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -49,6 +49,7 @@
 #include "cli/cli-script.h"
 #include "cli/cli-setshow.h"
 #include "cli/cli-cmds.h"
+#include "cli/cli-style.h"
 #include "cli/cli-utils.h"
 
 #include "extension.h"
@@ -451,10 +452,14 @@ pwd_command (const char *args, int from_tty)
            safe_strerror (errno));
 
   if (strcmp (cwd.get (), current_directory) != 0)
-    printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
-		       current_directory, cwd.get ());
+    printf_unfiltered (_("Working directory %ps\n (canonically %ps).\n"),
+		       styled_string (file_name_style.style (),
+				      current_directory),
+		       styled_string (file_name_style.style (), cwd.get ()));
   else
-    printf_unfiltered (_("Working directory %s.\n"), current_directory);
+    printf_unfiltered (_("Working directory %ps.\n"),
+		       styled_string (file_name_style.style (),
+				      current_directory));
 }
 
 void
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b9a320c981..88cec5dfb3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-01  Tom Tromey  <tom@tromey.com>
+
+	* gdb.base/style.exp: Test "pwd".
+
 2019-10-01  Tom Tromey  <tom@tromey.com>
 
 	* gdb.base/style.exp: Update tests.
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index d2c3105bb9..fb0dfed006 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -131,4 +131,6 @@ save_vars { env(TERM) } {
     gdb_test "file $binfile" \
 	"Reading symbols from [style $quoted file]..." \
 	"filename is styled when loading symbol file"
+
+    gdb_test "pwd" "Working directory [style .*? file].*"
 }


             reply	other threads:[~2019-10-02 15:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 15:44 gdb-buildbot [this message]
2019-10-02 15:44 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot
2019-10-02 18:09 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot
2019-10-05  2:03 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-m32, branch master *** BREAKAGE *** gdb-buildbot
2019-10-05  2:24 ` Failures on Fedora-i686, branch master gdb-buildbot
2019-10-05  2:29 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-m64, branch master *** BREAKAGE *** gdb-buildbot
2019-10-05  2:29 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-10-05  2:39 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2019-10-05  3:10 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, " gdb-buildbot
2019-10-05  3:10 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
2019-10-05  3:18 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master gdb-buildbot
2019-10-05  6:38 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14309bb6bfe31e5ad26035cd41a46bdbaec154b0@gdb-build \
    --to=gdb-buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).