Dan Villiom Podlaski Christiansen avatar Dan Villiom Podlaski Christiansen committed c1dc2a0

Better.

Comments (0)

Files changed (3)

fix-test-dollar.diff

+# HG changeset patch
+# Parent 5b0c59f9870c6e254713d5088d2974b5a6b4192d
+# User Dan Villiom Podlaski Christiansen  <danchr@gmail.com>
+diff --git a/tests/run-tests.py b/tests/run-tests.py
+--- a/tests/run-tests.py
++++ b/tests/run-tests.py
+@@ -672,7 +672,7 @@ def tsttest(test, wd, options, replaceme
+         elif l.startswith('  > '): # continuations
+             after.setdefault(prepos, []).append(l)
+             script.append(l[4:])
+-        elif l.startswith('  '): # results
++        elif l.startswith('  ') or l.startswith(' \\'): # results
+             # queue up a list of expected results
+             expected.setdefault(pos, []).append(l[2:])
+         else:
+@@ -725,7 +725,10 @@ def tsttest(test, wd, options, replaceme
+                 el = expected[pos].pop(0)
+ 
+             if linematch(el, lout):
+-                postout.append("  " + el)
++                if el.startswith('$'):
++                    postout.append(" \\" + el)
++                else:
++                    postout.append("  " + el)
+             else:
+                 if needescape(lout):
+                     lout = stringescape(lout.rstrip('\n')) + " (esc)\n"
+diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
+--- a/tests/test-run-tests.t
++++ b/tests/test-run-tests.t
+@@ -8,6 +8,12 @@ Simple commands:
+   bar
+   baz
+ 
++Output starting with a $ character
++
++  $ echo '$ oh noes'
++ \$ oh noes
++
++
+ Multi-line command:
+ 
+   $ foo() {

highlight-docutils.diff

 # HG changeset patch
-# Parent 308c5ccce31774c6a5ba0ec58334dbeeefc4f8fc
+# Parent 916741ced2e147f5f7b8c4c2fdf811273c76b9dc
 # User Dan Villiom Podlaski Christiansen  <danchr@gmail.com>
 highlight: use docutils for generating help if possible
 
 +  <p>An example showing how new (unknown) files are added
 +  automatically by <a class="reference external" href="add"><tt class="docutils literal">hg add</tt></a>:</p>
 +  <pre class="literal-block">
-+  $ ls
++ \$ ls
 +  foo.c
-+  $ hg status
++ \$ hg status
 +  ? foo.c
-+  $ hg add
++ \$ hg add
 +  adding foo.c
-+  $ hg status
++ \$ hg status
 +  A foo.c
 +  </pre>
 +  </div>
+fix-test-dollar.diff
 test-hgweb-help.diff
 move-help.diff
 better-rst.diff
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.