summaryrefslogtreecommitdiff
path: root/python/helpers/pydev/tests_python/test_pydev_monkey.py
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-08-20 17:01:23 -0700
committerTor Norbye <tnorbye@google.com>2014-08-20 17:01:23 -0700
commit1aa2e09bdbd413eacb677e9fa4b50630530d0656 (patch)
tree2f4cc6d69645bd460aa253fdecb606d764fbd25d /python/helpers/pydev/tests_python/test_pydev_monkey.py
parent02cf98d65c798d368fcec43ed64a001d513bdd4f (diff)
downloadidea-1aa2e09bdbd413eacb677e9fa4b50630530d0656.tar.gz
Snapshot idea/138.1696 from git://git.jetbrains.org/idea/community.git
Change-Id: I50c97b83a815ce635e49a38380ba5b8765e4b16a
Diffstat (limited to 'python/helpers/pydev/tests_python/test_pydev_monkey.py')
-rw-r--r--python/helpers/pydev/tests_python/test_pydev_monkey.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/helpers/pydev/tests_python/test_pydev_monkey.py b/python/helpers/pydev/tests_python/test_pydev_monkey.py
new file mode 100644
index 000000000000..3eb7930b73ae
--- /dev/null
+++ b/python/helpers/pydev/tests_python/test_pydev_monkey.py
@@ -0,0 +1,21 @@
+import unittest
+import pydev_monkey
+import sys
+
+
+
+class TestCase(unittest.TestCase):
+
+ def test_monkey(self):
+ check='''C:\\bin\\python.exe -u -c "
+connect(\\"127.0.0.1\\")
+"'''
+ sys.original_argv = []
+ self.assertEqual('"-u" "-c" "\nconnect(\\"127.0.0.1\\")\n"', pydev_monkey.patch_arg_str_win(check))
+
+ def test_str_to_args_windows(self):
+
+ self.assertEqual(['a', 'b'], pydev_monkey.str_to_args_windows('a "b"'))
+
+if __name__ == '__main__':
+ unittest.main() \ No newline at end of file