Patchwork [5,of,8] test-commandserver: clean up quoting and location of dbgui extension

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 8, 2018, 2:24 p.m.
Message ID <601786ab02a1925a42bf.1541687083@mimosa>
Download mbox | patch
Permalink /patch/36474/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 8, 2018, 2:24 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1541683504 -32400
#      Thu Nov 08 22:25:04 2018 +0900
# Node ID 601786ab02a1925a42bf63fac605322a135b040b
# Parent  c03e57f814d840dd97eb5e88b4534250456a2db6
test-commandserver: clean up quoting and location of dbgui extension

This helps embedding '$' in the script.

Patch

diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -607,7 +607,7 @@  changelog and manifest would have invali
   *** runcommand qqueue --active
   foo
 
-  $ cat <<EOF > dbgui.py
+  $ cat <<'EOF' > ../dbgui.py
   > import os
   > import sys
   > from mercurial import commands, registrar
@@ -615,10 +615,10 @@  changelog and manifest would have invali
   > command = registrar.command(cmdtable)
   > @command(b"debuggetpass", norepo=True)
   > def debuggetpass(ui):
-  >     ui.write(b"%s\\n" % ui.getpass())
+  >     ui.write(b"%s\n" % ui.getpass())
   > @command(b"debugprompt", norepo=True)
   > def debugprompt(ui):
-  >     ui.write(b"%s\\n" % ui.prompt(b"prompt:"))
+  >     ui.write(b"%s\n" % ui.prompt(b"prompt:"))
   > @command(b"debugreadstdin", norepo=True)
   > def debugreadstdin(ui):
   >     ui.write(b"read: %r\n" % sys.stdin.read(1))
@@ -630,7 +630,7 @@  changelog and manifest would have invali
   > EOF
   $ cat <<EOF >> .hg/hgrc
   > [extensions]
-  > dbgui = dbgui.py
+  > dbgui = ../dbgui.py
   > EOF
 
   >>> from hgclient import check, readchannel, runcommand, stringio