Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Need non-under-test stuff to escape

  • Loading branch information...
commit 1bfa7cf252f105f9d36f82c71d817a772a2242cd 1 parent 3c9d373
Jeff Forcier bitprophet authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 integration/test_contrib.py
7 integration/test_contrib.py
View
@@ -19,6 +19,9 @@ def expect(path):
def expect_contains(path, value):
assert files.contains(tildify(path), value)
+def escape(path):
+ return path.replace(' ', r'\ ')
+
class TestTildeExpansion(Integration):
def test_append(self):
@@ -28,12 +31,12 @@ def test_append(self):
def test_exists(self):
for target in ('~/exists_test', '~/exists test with space'):
- run("touch %s" % target)
+ run("touch %s" % escape(target))
expect(target)
def test_sed(self):
for target in ('~/sed_test', '~/sed test with space'):
- run("echo 'before' > %s" % target)
+ run("echo 'before' > %s" % escape(target))
files.sed(target, 'before', 'after')
expect_contains(target, 'after')
Please sign in to comment.
Something went wrong with that request. Please try again.