Permalink
Browse files

Add simple test for non-ascii characters in system_raw call.

  • Loading branch information...
1 parent fb3b776 commit b206d9008409ac0f8a11771cb1dce97650f32e81 Jörgen Stenarson committed Nov 17, 2011
Showing with 9 additions and 0 deletions.
  1. +1 −0 IPython/core/interactiveshell.py
  2. +8 −0 IPython/core/tests/test_interactiveshell.py
@@ -2085,6 +2085,7 @@ def system_raw(self, cmd):
cmd = py3compat.unicode_to_str(cmd)
ec = os.system(cmd)
else:
+ cmd = py3compat.unicode_to_str(cmd)
ec = os.system(cmd)
# We explicitly do NOT return the subprocess status code, because
@@ -220,3 +220,11 @@ def test_1(self):
"""Test safe_execfile with non-ascii path
"""
_ip.shell.safe_execfile(self.fname, {}, raise_exceptions=True)
+
+
+class TestSystemRaw(unittest.TestCase):
+ def test_1(self):
+ """Test system_raw with non-ascii cmd
+ """
+ cmd = ur'''python -c "u'åäö'" '''
+ _ip.shell.system_raw(cmd)

0 comments on commit b206d90

Please sign in to comment.